Skip to main content

CssRuleBuilder

Struct CssRuleBuilder 

Source
pub struct CssRuleBuilder { /* private fields */ }
Expand description

Builder for CssRule.

Implementations§

Source§

impl CssRuleBuilder

Source

pub fn style_sheet_id<VALUE: Into<StyleSheetId>>( &mut self, value: VALUE, ) -> &mut Self

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

Source

pub fn selector_list<VALUE: Into<SelectorList>>( &mut self, value: VALUE, ) -> &mut Self

Rule selector data.

Source

pub fn nesting_selectors<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

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

Source

pub fn origin<VALUE: Into<StyleSheetOrigin>>( &mut self, value: VALUE, ) -> &mut Self

Parent stylesheet’s origin.

Source

pub fn style<VALUE: Into<CssStyle>>(&mut self, value: VALUE) -> &mut Self

Associated style declaration.

Source

pub fn origin_tree_scope_node_id<VALUE: Into<BackendNodeId>>( &mut self, value: VALUE, ) -> &mut Self

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

Source

pub fn media<VALUE: Into<Vec<CssMedia>>>(&mut self, value: VALUE) -> &mut 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<VALUE: Into<Vec<CssContainerQuery>>>( &mut self, value: VALUE, ) -> &mut 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<VALUE: Into<Vec<CssSupports>>>( &mut self, value: VALUE, ) -> &mut Self

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

Source

pub fn layers<VALUE: Into<Vec<CssLayer>>>(&mut self, value: VALUE) -> &mut 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<VALUE: Into<Vec<CssScope>>>(&mut self, value: VALUE) -> &mut Self

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

Source

pub fn rule_types<VALUE: Into<Vec<CssRuleType>>>( &mut self, value: VALUE, ) -> &mut Self

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

Source

pub fn starting_styles<VALUE: Into<Vec<CssStartingStyle>>>( &mut self, value: VALUE, ) -> &mut Self

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

Source

pub fn build(&self) -> Result<CssRule, CssRuleBuilderError>

Builds a new CssRule.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Clone for CssRuleBuilder

Source§

fn clone(&self) -> CssRuleBuilder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for CssRuleBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.