Struct twilight_model::application::component::text_input::TextInput
source · [−]pub struct TextInput {
pub custom_id: String,
pub label: String,
pub max_length: Option<u16>,
pub min_length: Option<u16>,
pub placeholder: Option<String>,
pub required: Option<bool>,
pub style: TextInputStyle,
pub value: Option<String>,
}Expand description
Modal component to prompt users for a text input.
Refer to [Discord Docs/Input Text] for additional information.
Fields
custom_id: StringUser defined identifier for the input text.
label: StringText appearing over the input field.
max_length: Option<u16>The maximum length of the text.
min_length: Option<u16>The minimum length of the text.
Defaults to 0.
placeholder: Option<String>Placeholder for the text input.
required: Option<bool>Whether the user is required to input a text.
Defaults to true.
style: TextInputStyleStyle variant of the input text.
value: Option<String>Pre-filled value for input text.
Trait Implementations
impl Eq for TextInput
impl StructuralEq for TextInput
impl StructuralPartialEq for TextInput
Auto Trait Implementations
impl RefUnwindSafe for TextInput
impl Send for TextInput
impl Sync for TextInput
impl Unpin for TextInput
impl UnwindSafe for TextInput
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more