[][src]Struct azul_css::Stylesheet

pub struct Stylesheet {
    pub rules: Vec<CssRuleBlock>,
}

Fields

rules: Vec<CssRuleBlock>

The style rules making up the document - for example, de-duplicated CSS rules

Implementations

impl Stylesheet[src]

pub const fn new(rules: Vec<CssRuleBlock>) -> Self[src]

impl Stylesheet[src]

pub fn empty() -> Self[src]

Creates a new stylesheet with no style rules.

pub fn sort_by_specificity(&mut self)[src]

Sort the style rules by their weight, so that the rules are applied in the correct order. Should always be called when a new style is loaded from an external source.

Trait Implementations

impl Clone for Stylesheet[src]

impl Debug for Stylesheet[src]

impl Default for Stylesheet[src]

impl From<Vec<CssRuleBlock>> for Stylesheet[src]

impl PartialEq<Stylesheet> for Stylesheet[src]

impl PartialOrd<Stylesheet> for Stylesheet[src]

impl StructuralPartialEq for Stylesheet[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.