Enum style::rule_tree::CascadeLevel
[−]
[src]
#[repr(u8)]pub enum CascadeLevel { UANormal, PresHints, UserNormal, AuthorNormal, StyleAttributeNormal, SMILOverride, Animations, AuthorImportant, StyleAttributeImportant, UserImportant, UAImportant, Transitions, }
The cascade level these rules are relevant at, as per1.
The order of variants declared here is significant, and must be in ascending order of precedence.
Variants
UANormalNormal User-Agent rules.
PresHintsPresentational hints.
UserNormalUser normal rules.
AuthorNormalAuthor normal rules.
StyleAttributeNormalStyle attribute normal rules.
SMILOverrideSVG SMIL animations.
AnimationsCSS animations and script-generated animations.
AuthorImportantAuthor-supplied important rules.
StyleAttributeImportantStyle attribute important rules.
UserImportantUser important rules.
UAImportantUser-agent important rules.
TransitionsTransitions
NB: If this changes from being last, change from_byte below.
Methods
impl CascadeLevel[src]
pub unsafe fn from_byte(byte: u8) -> Self[src]
Converts a raw byte to a CascadeLevel.
pub fn guard<'a>(
&self,
guards: &'a StylesheetGuards<'a>
) -> &'a SharedRwLockReadGuard<'a>[src]
&self,
guards: &'a StylesheetGuards<'a>
) -> &'a SharedRwLockReadGuard<'a>
Select a lock guard for this level
pub fn is_unique_per_element(&self) -> bool[src]
Returns whether this cascade level is unique per element, in which case we can replace the path in the cascade without fear.
pub fn is_important(&self) -> bool[src]
Returns whether this cascade level represents important rules of some sort.
pub fn importance(&self) -> Importance[src]
Returns the importance relevant for this rule. Pretty similar to
is_important.
pub fn is_animation(&self) -> bool[src]
Returns whether this cascade level represents an animation rules.
Trait Implementations
impl Clone for CascadeLevel[src]
fn clone(&self) -> CascadeLevel[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Copy for CascadeLevel[src]
impl Debug for CascadeLevel[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Eq for CascadeLevel[src]
impl PartialEq for CascadeLevel[src]
fn eq(&self, __arg_0: &CascadeLevel) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl PartialOrd for CascadeLevel[src]
fn partial_cmp(&self, __arg_0: &CascadeLevel) -> Option<Ordering>[src]
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Rhs) -> bool1.0.0[src]
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl MallocSizeOf for CascadeLevel[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize[src]
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more