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 duplicate 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>
Source§impl Default for StyleSheet<'_>
 
impl Default for StyleSheet<'_>
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