pub struct Modal {
pub custom_id: String,
pub title: String,
pub components: Vec<Component>,
}Expand description
A modal: up to five labelled inputs and texts.
Fields§
§custom_id: StringIts custom_id.
title: StringIts title.
components: Vec<Component>Its labels and texts.
Implementations§
Source§impl Modal
impl Modal
Sourcepub fn field(self, label: impl Into<String>, input: Component) -> Self
pub fn field(self, label: impl Into<String>, input: Component) -> Self
Adds any input (radio, checkbox, file upload, …) under label.
Sourcepub fn input(self, label: impl Into<String>, input: TextInput) -> Self
pub fn input(self, label: impl Into<String>, input: TextInput) -> Self
Adds a text field under label.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Modal
impl RefUnwindSafe for Modal
impl Send for Modal
impl Sync for Modal
impl Unpin for Modal
impl UnsafeUnpin for Modal
impl UnwindSafe for Modal
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