pub struct TextInput {
pub custom_id: String,
pub style: TextInputStyle,
pub label: String,
pub value: Option<String>,
pub placeholder: Option<String>,
pub min_length: Option<u16>,
pub max_length: Option<u16>,
pub required: Option<bool>,
/* private fields */
}Fields§
§custom_id: String§style: TextInputStyle§label: String§value: Option<String>§placeholder: Option<String>§min_length: Option<u16>§max_length: Option<u16>§required: Option<bool>Implementations§
Source§impl TextInput
impl TextInput
pub fn new(custom_id: &str, label: &str) -> Self
pub fn style(self, style: TextInputStyle) -> Self
pub fn placeholder(self, placeholder: &str) -> Self
pub fn value(self, value: &str) -> Self
pub fn limits(self, min: u16, max: u16) -> Self
pub fn required(self, required: bool) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TextInput
impl<'de> Deserialize<'de> for TextInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TextInput
impl RefUnwindSafe for TextInput
impl Send for TextInput
impl Sync for TextInput
impl Unpin for TextInput
impl UnwindSafe for TextInput
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