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

#[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.

Implementations

impl StyleBuilder[src]

pub fn build(self) -> Style[src]

Initialize the element with all of the attributes so far.

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 Element for StyleBuilder[src]

impl<E> EventTarget<E> for StyleBuilder where
    E: GlobalEvent
[src]

impl GlobalEventHandler for StyleBuilder[src]

impl HtmlElement for StyleBuilder[src]

impl Node 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
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<N> Child for N where
    N: Node
[src]

impl<T> Downcast for T where
    T: Any

impl<T> Erased for T

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.