Enum style::rule_tree::StyleSource
[−]
[src]
pub enum StyleSource { Style(Arc<Locked<StyleRule>>), Declarations(Arc<Locked<PropertyDeclarationBlock>>), None, }
A style source for the rule node. It can either be a CSS style rule or a declaration block.
Note that, even though the declaration block from inside the style rule could be enough to implement the rule tree, keeping the whole rule provides more debuggability, and also the ability of show those selectors to devtools.
Variants
Style(Arc<Locked<StyleRule>>)
A style rule stable pointer.
Declarations(Arc<Locked<PropertyDeclarationBlock>>)
A declaration block stable pointer.
None
Indicates no style source. Used to save an Option wrapper around the stylesource in RuleNode
Methods
impl StyleSource
[src]
pub fn read<'a>(
&'a self,
guard: &'a SharedRwLockReadGuard
) -> &'a PropertyDeclarationBlock
[src]
&'a self,
guard: &'a SharedRwLockReadGuard
) -> &'a PropertyDeclarationBlock
Read the style source guard, and obtain thus read access to the underlying property declaration block.
pub fn is_some(&self) -> bool
[src]
Indicates if this StyleSource has a value
Trait Implementations
impl Clone for StyleSource
[src]
fn clone(&self) -> StyleSource
[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 StyleSource
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more