[][src]Enum style::stylesheets::CssRule

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>>)

Implementations

impl CssRule[src]

pub fn rule_type(&self) -> CssRuleType[src]

Returns the CSSOM rule type of this rule.

fn rule_state(&self) -> State[src]

pub fn parse(
    css: &str,
    insert_rule_context: InsertRuleContext,
    parent_stylesheet_contents: &StylesheetContents,
    shared_lock: &SharedRwLock,
    state: State,
    loader: Option<&dyn StylesheetLoader>,
    allow_import_rules: AllowImportRules
) -> Result<Self, RulesMutateError>
[src]

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]

impl Debug for CssRule[src]

impl DeepCloneWithLock for CssRule[src]

fn deep_clone_with_lock(
    &self,
    lock: &SharedRwLock,
    guard: &SharedRwLockReadGuard,
    params: &DeepCloneParams
) -> CssRule
[src]

Deep clones this CssRule.

impl ToCssWithGuard for CssRule[src]

impl ToShmem for CssRule[src]

Auto Trait Implementations

impl !RefUnwindSafe for CssRule

impl Send for CssRule

impl Sync for CssRule

impl Unpin for CssRule

impl !UnwindSafe for CssRule

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> Erased for T[src]

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

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

impl<T> MaybeBoxed<Box<T>> for T[src]

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

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

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]