pub struct StyleSheet<'a> {
pub rules: Vec<Rule<'a>>,
}
Expand description
A style sheet.
Fields§
§rules: Vec<Rule<'a>>
A list of rules.
Implementations§
source§impl<'a> StyleSheet<'a>
impl<'a> StyleSheet<'a>
sourcepub fn parse(text: &'a str) -> Self
pub fn parse(text: &'a str) -> Self
Parses a style sheet from text.
At-rules are not supported and will be skipped.
§Errors
Doesn’t produce any errors. In worst case scenario will return an empty stylesheet.
All warnings will be logged.
sourcepub fn parse_more(&mut self, text: &'a str)
pub fn parse_more(&mut self, text: &'a str)
Parses a style sheet from a text to the current style sheet.
Trait Implementations§
source§impl<'a> Clone for StyleSheet<'a>
impl<'a> Clone for StyleSheet<'a>
source§fn clone(&self) -> StyleSheet<'a>
fn clone(&self) -> StyleSheet<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for StyleSheet<'a>
impl<'a> Debug for StyleSheet<'a>
Auto Trait Implementations§
impl<'a> Freeze for StyleSheet<'a>
impl<'a> RefUnwindSafe for StyleSheet<'a>
impl<'a> Send for StyleSheet<'a>
impl<'a> Sync for StyleSheet<'a>
impl<'a> Unpin for StyleSheet<'a>
impl<'a> UnwindSafe for StyleSheet<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)