[−][src]Enum style::stylesheets::CssRule
A CSS rule.
TODO(emilio): Lots of spec links should be around.
Variants
Namespace(Arc<Locked<NamespaceRule>>)Import(Arc<Locked<ImportRule>>)FontFace(Arc<Locked<FontFaceRule>>)FontFeatureValues(Arc<Locked<FontFeatureValuesRule>>)CounterStyle(Arc<Locked<CounterStyleRule>>)Viewport(Arc<Locked<ViewportRule>>)Keyframes(Arc<Locked<KeyframesRule>>)Supports(Arc<Locked<SupportsRule>>)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]
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>
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]
&self,
lock: &SharedRwLock,
guard: &SharedRwLockReadGuard,
params: &DeepCloneParams
) -> CssRule
Deep clones this CssRule.
impl ToCssWithGuard for CssRule[src]
fn to_css(
&self,
guard: &SharedRwLockReadGuard,
dest: &mut CssStringWriter
) -> Result[src]
&self,
guard: &SharedRwLockReadGuard,
dest: &mut CssStringWriter
) -> Result
fn to_css_string(&self, guard: &SharedRwLockReadGuard) -> CssString[src]
impl ToShmem for CssRule[src]
fn to_shmem(&self, builder: &mut SharedMemoryBuilder) -> Result<Self>[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[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]
U: From<T>,
impl<T> MaybeBoxed<Box<T>> for T[src]
fn maybe_boxed(Self) -> Box<T>[src]
impl<T> MaybeBoxed<T> for T[src]
fn maybe_boxed(Self) -> 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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>, [src]
V: MultiLane<T>,