pub struct CssRule {
pub style_sheet_id: Option<StyleSheetId>,
pub selector_list: SelectorList,
pub nesting_selectors: Option<Vec<String>>,
pub origin: StyleSheetOrigin,
pub style: CssStyle,
pub media: Option<Vec<CssMedia>>,
pub container_queries: Option<Vec<CssContainerQuery>>,
pub supports: Option<Vec<CssSupports>>,
pub layers: Option<Vec<CssLayer>>,
pub scopes: Option<Vec<CssScope>>,
pub rule_types: Option<Vec<CssRuleType>>,
}
Expand description
CSS rule representation. CSSRule
Fields§
§style_sheet_id: Option<StyleSheetId>
The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
selector_list: SelectorList
Rule selector data.
nesting_selectors: Option<Vec<String>>
Array of selectors from ancestor style rules, sorted by distance from the current rule.
origin: StyleSheetOrigin
Parent stylesheet’s origin.
style: CssStyle
Associated style declaration.
media: Option<Vec<CssMedia>>
Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
container_queries: Option<Vec<CssContainerQuery>>
Container query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.
supports: Option<Vec<CssSupports>>
@supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.
layers: Option<Vec<CssLayer>>
Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.
scopes: Option<Vec<CssScope>>
@scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.
rule_types: Option<Vec<CssRuleType>>
The array keeps the types of ancestor CSSRules from the innermost going outwards.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CssRule
impl<'de> Deserialize<'de> for CssRule
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CssRule, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CssRule, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for CssRule
impl Serialize for CssRule
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for CssRule
Auto Trait Implementations§
impl Freeze for CssRule
impl RefUnwindSafe for CssRule
impl Send for CssRule
impl Sync for CssRule
impl Unpin for CssRule
impl UnwindSafe for CssRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more