Enum style::stylesheets::CssRule
[−]
[src]
pub enum CssRule { Namespace(Arc<Locked<NamespaceRule>>), Import(Arc<Locked<ImportRule>>), Style(Arc<Locked<StyleRule>>), Media(Arc<Locked<MediaRule>>), FontFace(Arc<Locked<FontFaceRule>>), FontFeatureValues(Arc<Locked<FontFeatureValuesRule>>), CounterStyle(Arc<Locked<CounterStyleRule>>), Viewport(Arc<Locked<ViewportRule>>), Keyframes(Arc<Locked<KeyframesRule>>), Supports(Arc<Locked<SupportsRule>>), Page(Arc<Locked<PageRule>>), Document(Arc<Locked<DocumentRule>>), }
A CSS rule.
TODO(emilio): Lots of spec links should be around.
Variants
Namespace(Arc<Locked<NamespaceRule>>)
Import(Arc<Locked<ImportRule>>)
Style(Arc<Locked<StyleRule>>)
Media(Arc<Locked<MediaRule>>)
FontFace(Arc<Locked<FontFaceRule>>)
FontFeatureValues(Arc<Locked<FontFeatureValuesRule>>)
CounterStyle(Arc<Locked<CounterStyleRule>>)
Viewport(Arc<Locked<ViewportRule>>)
Keyframes(Arc<Locked<KeyframesRule>>)
Supports(Arc<Locked<SupportsRule>>)
Page(Arc<Locked<PageRule>>)
Document(Arc<Locked<DocumentRule>>)
Methods
impl CssRule
[src]
pub fn rule_type(&self) -> CssRuleType
[src]
Returns the CSSOM rule type of this rule.
pub fn parse(
css: &str,
parent_stylesheet_contents: &StylesheetContents,
shared_lock: &SharedRwLock,
state: Option<State>,
loader: Option<&StylesheetLoader>
) -> Result<(Self, State), SingleRuleParseError>
[src]
css: &str,
parent_stylesheet_contents: &StylesheetContents,
shared_lock: &SharedRwLock,
state: Option<State>,
loader: Option<&StylesheetLoader>
) -> Result<(Self, State), SingleRuleParseError>
Parse a CSS rule.
Returns a parsed CSS rule and the final state of the parser.
Input state is None for a nested rule
Trait Implementations
impl Clone for CssRule
[src]
fn clone(&self) -> CssRule
[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 CssRule
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl DeepCloneWithLock for CssRule
[src]
fn deep_clone_with_lock(
&self,
lock: &SharedRwLock,
guard: &SharedRwLockReadGuard,
params: &DeepCloneParams
) -> CssRule
[src]
&self,
lock: &SharedRwLock,
guard: &SharedRwLockReadGuard,
params: &DeepCloneParams
) -> CssRule
Deep clones this CssRule.
impl ToCssWithGuard for CssRule
[src]
fn to_css<W>(&self, guard: &SharedRwLockReadGuard, dest: &mut W) -> Result where
W: Write,
[src]
W: Write,
Serialize self
in CSS syntax, writing to dest
, using the given lock guard.
fn to_css_string(&self, guard: &SharedRwLockReadGuard) -> String
[src]
Serialize self
in CSS syntax using the given lock guard and return a string. Read more