pub struct ControlInput { /* private fields */ }Expand description
What a Control renders for one form: the field’s key, its DOM id, its current value, and
its validation state.
Implementations§
Source§impl ControlInput
impl ControlInput
pub fn name(&self) -> &str
Sourcepub fn id(&self) -> &str
pub fn id(&self) -> &str
The control’s DOM id, which its label names: the key, prefixed when its form shares the page with another, such as an action’s input in a dialog.
pub fn value(&self) -> Option<&str>
pub fn required(&self) -> bool
pub fn invalid(&self) -> bool
pub fn described_by(&self) -> Option<&str>
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Whether the control renders disabled: the server ignores what it posts.
pub fn attributes(&self, cx: &Cx) -> Attributes
Trait Implementations§
Source§impl Clone for ControlInput
impl Clone for ControlInput
Auto Trait Implementations§
impl Forget for ControlInput
impl Freeze for ControlInput
impl RefUnwindSafe for ControlInput
impl Send for ControlInput
impl Sync for ControlInput
impl Unpin for ControlInput
impl UnsafeUnpin for ControlInput
impl UnwindSafe for ControlInput
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