Skip to main content

CSSRuleBuilder

Struct CSSRuleBuilder 

Source
pub struct CSSRuleBuilder<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> CSSRuleBuilder<'a>

Source

pub fn style_sheet_id(self, style_sheet_id: StyleSheetId<'a>) -> Self

The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.

Source

pub fn nesting_selectors(self, nesting_selectors: Vec<Cow<'a, str>>) -> Self

Array of selectors from ancestor style rules, sorted by distance from the current rule.

Source

pub fn origin_tree_scope_node_id( self, origin_tree_scope_node_id: BackendNodeId, ) -> Self

The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.

Source

pub fn media(self, media: Vec<CSSMedia<'a>>) -> Self

Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.

Source

pub fn container_queries( self, container_queries: Vec<CSSContainerQuery<'a>>, ) -> Self

Container query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.

Source

pub fn supports(self, supports: Vec<CSSSupports<'a>>) -> Self

@supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.

Source

pub fn layers(self, layers: Vec<CSSLayer<'a>>) -> Self

Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.

Source

pub fn scopes(self, scopes: Vec<CSSScope<'a>>) -> Self

@scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.

Source

pub fn rule_types(self, rule_types: Vec<CSSRuleType>) -> Self

The array keeps the types of ancestor CSSRules from the innermost going outwards.

Source

pub fn starting_styles(self, starting_styles: Vec<CSSStartingStyle<'a>>) -> Self

@starting-style CSS at-rule array. The array enumerates @starting-style at-rules starting with the innermost one, going outwards.

Source

pub fn navigations(self, navigations: Vec<CSSNavigation<'a>>) -> Self

@navigation CSS at-rule array. The array enumerates @navigation at-rules starting with the innermost one, going outwards.

Source

pub fn build(self) -> CSSRule<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for CSSRuleBuilder<'a>

§

impl<'a> RefUnwindSafe for CSSRuleBuilder<'a>

§

impl<'a> Send for CSSRuleBuilder<'a>

§

impl<'a> Sync for CSSRuleBuilder<'a>

§

impl<'a> Unpin for CSSRuleBuilder<'a>

§

impl<'a> UnsafeUnpin for CSSRuleBuilder<'a>

§

impl<'a> UnwindSafe for CSSRuleBuilder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.