Struct moxie_dom::elements::metadata::StyleBuilder[][src]

#[must_use = "needs to be built"]pub struct StyleBuilder { /* fields omitted */ }

The HTML <style> element contains style information for a document, or part of a document.

A type for initializing the element’s attributes before calling build.


impl StyleBuilder[src]

pub fn media(self, to_set: impl ToString) -> Self[src]

This attribute defines which media the style should be applied to. Its value is a media query, which defaults to all if the attribute is missing.

pub fn nonce(self, to_set: impl ToString) -> Self[src]

A cryptographic nonce (number used once) used to whitelist inline styles in a style-src Content-Security-Policy. The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource’s policy is otherwise trivial.

pub fn title(self, to_set: impl ToString) -> Self[src]

This attribute specifies alternative style sheet sets.

Trait Implementations

impl ElementBuilder for StyleBuilder[src]

impl<E> EventTarget<E> for StyleBuilder where
    E: GlobalEvent

impl GlobalEventHandler for StyleBuilder[src]

impl HtmlElementBuilder for StyleBuilder[src]

impl NodeBuilder for StyleBuilder[src]

type Output = Style

The type of the DOM node

fn build(self) -> Style[src]

Initialize the element with all of the attributes so far.

impl NodeWrapper for StyleBuilder[src]

impl Parent<Text> for StyleBuilder[src]

Auto Trait Implementations

impl !RefUnwindSafe for StyleBuilder

impl !Send for StyleBuilder

impl !Sync for StyleBuilder

impl Unpin for StyleBuilder

impl !UnwindSafe for StyleBuilder

Blanket Implementations

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

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

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

impl<N> Child for N where
    N: NodeWrapper

impl<T> Downcast for T where
    T: Any

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.