Struct style::applicable_declarations::ApplicableDeclarationBlock
[−]
[src]
pub struct ApplicableDeclarationBlock {
pub source: StyleSource,
pub specificity: u32,
// some fields omitted
}A property declaration together with its precedence among rules of equal specificity so that we can sort them.
This represents the declarations in a given declaration block for a given importance.
Fields
source: StyleSource
The style source, either a style rule, or a property declaration block.
specificity: u32
The specificity of the selector this block is represented by.
Methods
impl ApplicableDeclarationBlock[src]
pub fn from_declarations(
declarations: Arc<Locked<PropertyDeclarationBlock>>,
level: CascadeLevel
) -> Self[src]
declarations: Arc<Locked<PropertyDeclarationBlock>>,
level: CascadeLevel
) -> Self
Constructs an applicable declaration block from a given property declaration block and importance.
pub fn new(
source: StyleSource,
order: u32,
level: CascadeLevel,
specificity: u32
) -> Self[src]
source: StyleSource,
order: u32,
level: CascadeLevel,
specificity: u32
) -> Self
Constructs an applicable declaration block from the given components
pub fn source_order(&self) -> u32[src]
Returns the source order of the block.
pub fn level(&self) -> CascadeLevel[src]
Returns the cascade level of the block.
pub fn order_and_level(self) -> (StyleSource, CascadeLevel)[src]
Convenience method to consume self and return the source alongside the level.
Trait Implementations
impl Clone for ApplicableDeclarationBlock[src]
fn clone(&self) -> ApplicableDeclarationBlock[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 Debug for ApplicableDeclarationBlock[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl MallocSizeOf for ApplicableDeclarationBlock[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
impl PartialEq for ApplicableDeclarationBlock[src]
fn eq(&self, __arg_0: &ApplicableDeclarationBlock) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &ApplicableDeclarationBlock) -> bool[src]
This method tests for !=.