[][src]Struct moxie_dom::elements::forms::LabelBuilder

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

The HTML <label> element represents a caption for an item in a user interface.

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

Implementations

impl LabelBuilder[src]

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

Initialize the element with all of the attributes so far.

impl LabelBuilder[src]

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

The id of a labelable form-related element in the same document as the <label> element. The first element in the document with an id matching the value of the for attribute is the labeled control for this label element, if it is a labelable element. If it is not labelable then the for attribute has no effect. If there are other elements which also match the id value, later in the document, they are not considered.

Note: A <label> element can have both a for attribute and a contained control element, as long as the for attribute points to the contained control element.

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

The <form> element with which the label is associated (its form owner). If specified, the value of the attribute is the id of a <form> element in the same document. This lets you place label elements anywhere within a document, not just as descendants of their form elements.

Trait Implementations

impl ElementBuilder for LabelBuilder[src]

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

impl GlobalEventHandler for LabelBuilder[src]

impl HtmlElementBuilder for LabelBuilder[src]

impl NodeWrapper for LabelBuilder[src]

impl<Child> Parent<Child> for LabelBuilder where
    Child: PhrasingContent
[src]

Auto Trait Implementations

impl !RefUnwindSafe for LabelBuilder[src]

impl !Send for LabelBuilder[src]

impl !Sync for LabelBuilder[src]

impl Unpin for LabelBuilder[src]

impl !UnwindSafe for LabelBuilder[src]

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: NodeWrapper
[src]

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