pub struct TextInput<'a> {
pub component_type: ComponentType,
pub custom_id: TitanString<'a>,
pub style: TextInputStyle,
pub label: TitanString<'a>,
pub min_length: Option<u16>,
pub max_length: Option<u16>,
pub required: Option<bool>,
pub value: Option<TitanString<'a>>,
pub placeholder: Option<TitanString<'a>>,
}Expand description
A text input field (Modals only).
Fields§
§component_type: ComponentTypeType 4 (TextInput).
custom_id: TitanString<'a>Custom ID.
style: TextInputStyleInput style (Short vs Paragraph).
label: TitanString<'a>Label for the input.
min_length: Option<u16>Minimum length.
max_length: Option<u16>Maximum length.
required: Option<bool>Whether required.
value: Option<TitanString<'a>>Pre-filled value.
placeholder: Option<TitanString<'a>>Placeholder text.
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for TextInput<'a>
impl<'de, 'a> Deserialize<'de> for TextInput<'a>
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<'a> Freeze 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> UnwindSafe for TextInput<'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