Struct silkenweb_html::elements::MeterBuilder
source · pub struct MeterBuilder(_);
Implementations§
source§impl MeterBuilder
impl MeterBuilder
pub fn id(self, value: impl AttributeValue<String>) -> Self
pub fn class(self, value: impl AttributeValue<String>) -> Self
sourcepub fn value(self, value: impl AttributeValue<String>) -> Self
pub fn value(self, value: impl AttributeValue<String>) -> Self
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.
sourcepub fn min(self, value: impl AttributeValue<String>) -> Self
pub fn min(self, value: impl AttributeValue<String>) -> Self
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.
sourcepub fn max(self, value: impl AttributeValue<String>) -> Self
pub fn max(self, value: impl AttributeValue<String>) -> Self
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.
sourcepub fn form(self, value: impl AttributeValue<String>) -> Self
pub fn form(self, value: impl AttributeValue<String>) -> Self
The <form>
element to associate the <meter>
element with (its form owner). The value
of this attribute must be the id of a <form>
in the same document. If this attribute
is not set, the <button>
is associated with its ancestor <form>
element, if any.
This attribute is only used if the <meter>
element is being used as a form-associated
element, such as one displaying a range corresponding to an <input type="number">
.
sourcepub fn high(self, value: impl AttributeValue<u32>) -> Self
pub fn high(self, value: impl AttributeValue<u32>) -> Self
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.
sourcepub fn low(self, value: impl AttributeValue<u32>) -> Self
pub fn low(self, value: impl AttributeValue<u32>) -> Self
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.
sourcepub fn optimum(self, value: impl AttributeValue<u32>) -> Self
pub fn optimum(self, value: impl AttributeValue<u32>) -> Self
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.