Style

Struct Style 

Source
pub struct Style<'a> {
    pub global: GlobalAttributes<'a>,
    pub events: Events<'a>,
    pub media: Cow<'a, str>,
    pub nonce: Cow<'a, str>,
    pub type: Cow<'a, str>,
    pub children: Vec<Node<'a>>,
}
Expand description

A <style> element

Fields§

§global: GlobalAttributes<'a>

The global attributes of this element

§events: Events<'a>

The element’s events

§media: Cow<'a, str>

The media attribute

§nonce: Cow<'a, str>

The nonce attribute

§type: Cow<'a, str>

The type attribute

§children: Vec<Node<'a>>

The children of this element

Trait Implementations§

Source§

impl<'a> Clone for Style<'a>

Source§

fn clone(&self) -> Style<'a>

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<'a> Debug for Style<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for Style<'a>

Source§

fn default() -> Style<'a>

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

impl<'a> Display for Style<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Element<'a> for Style<'a>

Source§

fn events_mut(&mut self) -> &mut Events<'a>

Get the mutable events of this element
Source§

fn children_mut(&mut self) -> &mut Vec<Node<'a>>

Get the mutable children of this element
Source§

impl<'a> From<Style<'a>> for Node<'a>

Source§

fn from(element: Style<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> HasAutofocus<'a> for Style<'a>

Source§

fn get_autofocus(&self) -> bool

Get the value of the autofocus attribute
Source§

fn set_autofocus(&mut self, val: impl Into<bool>)

Set the value of the autofocus attribute
Source§

impl<'a> HasClass<'a> for Style<'a>

Source§

fn get_class(&self) -> &'_ str

Get the value of the class attribute
Source§

fn set_class(&mut self, val: impl Into<Cow<'a, str>>)

Set the value of the class attribute
Source§

impl<'a> HasId<'a> for Style<'a>

Source§

fn get_id(&self) -> &'_ str

Get the value of the id attribute
Source§

fn set_id(&mut self, val: impl Into<Cow<'a, str>>)

Set the value of the id attribute
Source§

impl<'a> HasItemscope<'a> for Style<'a>

Source§

fn get_itemscope(&self) -> bool

Get the value of the itemscope attribute
Source§

fn set_itemscope(&mut self, val: impl Into<bool>)

Set the value of the itemscope attribute
Source§

impl<'a> HasMedia<'a> for Style<'a>

Source§

fn get_media(&self) -> &'_ str

Get the value of the media attribute
Source§

fn set_media(&mut self, val: impl Into<Cow<'a, str>>)

Set the value of the media attribute
Source§

impl<'a> HasNonce<'a> for Style<'a>

Source§

fn get_nonce(&self) -> &'_ str

Get the value of the nonce attribute
Source§

fn set_nonce(&mut self, val: impl Into<Cow<'a, str>>)

Set the value of the nonce attribute
Source§

impl<'a> HasStyle<'a> for Style<'a>

Source§

fn get_style(&self) -> &'_ str

Get the value of the style attribute
Source§

fn set_style(&mut self, val: impl Into<Cow<'a, str>>)

Set the value of the style attribute
Source§

impl<'a> HasTitle<'a> for Style<'a>

Source§

fn get_title(&self) -> &'_ str

Get the value of the title attribute
Source§

fn set_title(&mut self, val: impl Into<Cow<'a, str>>)

Set the value of the title attribute
Source§

impl<'a> HasType<'a> for Style<'a>

Source§

fn get_type(&self) -> &'_ str

Get the value of the type attribute
Source§

fn set_type(&mut self, val: impl Into<Cow<'a, str>>)

Set the value of the type attribute

Auto Trait Implementations§

§

impl<'a> Freeze for Style<'a>

§

impl<'a> RefUnwindSafe for Style<'a>

§

impl<'a> Send for Style<'a>

§

impl<'a> Sync for Style<'a>

§

impl<'a> Unpin for Style<'a>

§

impl<'a> UnwindSafe for Style<'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> 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<'a, E, D> ElementData<E> for D
where E: Element<'a>, D: Into<Node<'a>>,

Source§

fn add_to(self, elem: &mut E)

Add this data to the given element
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.