pub struct TextInput<'a> {
pub name: &'a str,
pub input_type: &'a str,
pub value: &'a str,
pub placeholder: &'a str,
pub extra_class: &'a str,
pub required: bool,
}Expand description
Text input primitive with optional value, placeholder, CSS class, and required.
Fields§
§name: &'a str§input_type: &'a str§value: &'a str§placeholder: &'a str§extra_class: &'a str§required: boolImplementations§
Source§impl<'a> TextInput<'a>
impl<'a> TextInput<'a>
pub fn text(name: &'a str, value: &'a str, placeholder: &'a str) -> Self
pub fn password(name: &'a str, placeholder: &'a str) -> Self
pub fn search(name: &'a str, value: &'a str, placeholder: &'a str) -> Self
pub fn required(self) -> Self
pub fn with_class(self, cls: &'a str) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for TextInput<'a>
impl<'a> Freeze for TextInput<'a>
impl<'a> Move for TextInput<'a>
impl<'a> RefUnwindSafe for TextInput<'a>
impl<'a> Send for TextInput<'a>
impl<'a> Sync for TextInput<'a>
impl<'a> Unpin for TextInput<'a>
impl<'a> UnsafeUnpin for TextInput<'a>where
&'a str: UnsafeUnpin,
impl<'a> UnwindSafe for TextInput<'a>where
&'a str: UnwindSafe,
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