pub struct FieldProps<'__a> {
pub orientation: FieldOrientation,
pub attrs: Attributes,
pub child: Child<'__a>,
}Expand description
A control and its label, description, and optional error message.
Compose it with existing inputs, selects, checkboxes, or other controls.
Set for on field_label to the control’s id, and connect descriptions
and errors through the control’s aria-describedby. Set aria-invalid
to "true" on an invalid control; the field then colors its label too.
A data-invalid="true" attribute on the field also colors its label.
Validation and the visibility of error messages belong to the caller.
Attributes are forwarded to the wrapper and classes are appended.
Fields§
§orientation: FieldOrientation§attrs: Attributes§child: Child<'__a>Implementations§
Source§impl<'__a> FieldProps<'__a>
impl<'__a> FieldProps<'__a>
Sourcepub fn builder() -> FieldPropsBuilder<'__a>
pub fn builder() -> FieldPropsBuilder<'__a>
Returns a FieldPropsBuilder with no properties set.
Trait Implementations§
Auto Trait Implementations§
impl<'__a> !RefUnwindSafe for FieldProps<'__a>
impl<'__a> !Sync for FieldProps<'__a>
impl<'__a> !UnwindSafe for FieldProps<'__a>
impl<'__a> Freeze for FieldProps<'__a>
impl<'__a> Send for FieldProps<'__a>
impl<'__a> Unpin for FieldProps<'__a>
impl<'__a> UnsafeUnpin for FieldProps<'__a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more