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

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

The HTML <meter> element represents either a scalar value within a known range or a fractional value.

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

Implementations

impl MeterBuilder[src]

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

Initialize the element with all of the attributes so far.

impl MeterBuilder[src]

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

The current numeric value. This must be between the minimum and maximum values (min attribute and max attribute) if they are specified. If unspecified or malformed, the value is 0. If specified, but not within the range given by the min attribute and max attribute, the value is equal to the nearest end of the range.

Note: Unless the value attribute is between 0 and 1 (inclusive), the min and max attributes should define the range so that the value attribute's value is within it.

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

The lower numeric bound of the measured range. This must be less than the maximum value (max attribute), if specified. If unspecified, the minimum value is 0.

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

The upper numeric bound of the measured range. This must be greater than the minimum value (min attribute), if specified. If unspecified, the maximum value is 1.

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

The

element to associate the element with (its form owner). The value of this attribute must be the id of a in the same document. If this attribute is not set, the

pub fn high(self, to_set: u32) -> Self[src]

The upper numeric bound of the low end of the measured range. This must be greater than the minimum value (min attribute), and it also must be less than the high value and maximum value (high attribute and max attribute, respectively), if any are specified. If unspecified, or if less than the minimum value, the low value is equal to the minimum value.

pub fn low(self, to_set: u32) -> Self[src]

The lower numeric bound of the high end of the measured range. This must be less than the maximum value (max attribute), and it also must be greater than the low value and minimum value (low attribute and min attribute, respectively), if any are specified. If unspecified, or if greater than the maximum value, the high value is equal to the maximum value.

pub fn optimum(self, to_set: u32) -> Self[src]

This attribute indicates the optimal numeric value. It must be within the range (as defined by the min attribute and max attribute). When used with the low attribute and high attribute, it gives an indication where along the range is considered preferable. For example, if it is between the min attribute and the low attribute, then the lower range is considered preferred.

Trait Implementations

impl Element for MeterBuilder[src]

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

impl GlobalEventHandler for MeterBuilder[src]

impl HtmlElement for MeterBuilder[src]

impl Node for MeterBuilder[src]

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

Auto Trait Implementations

impl !RefUnwindSafe for MeterBuilder

impl !Send for MeterBuilder

impl !Sync for MeterBuilder

impl Unpin for MeterBuilder

impl !UnwindSafe for MeterBuilder

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