pub struct ToastProps {
pub message: String,
pub variant: ToastVariant,
pub timeout: Option<u32>,
pub dismissible: bool,
}Expand description
Props for Toast component (declarative notification intent).
The JS runtime reads data attributes from the rendered element to display the toast. Timeouts and dismissal are handled client-side.
Fields§
§message: String§variant: ToastVariant§timeout: Option<u32>Seconds before auto-dismiss. Default 5.
dismissible: boolTrait Implementations§
Source§impl Clone for ToastProps
impl Clone for ToastProps
Source§fn clone(&self) -> ToastProps
fn clone(&self) -> ToastProps
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToastProps
impl Debug for ToastProps
Source§impl<'de> Deserialize<'de> for ToastProps
impl<'de> Deserialize<'de> for ToastProps
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
Source§impl JsonSchema for ToastProps
impl JsonSchema for ToastProps
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ToastProps
impl PartialEq for ToastProps
Source§impl Serialize for ToastProps
impl Serialize for ToastProps
impl Eq for ToastProps
impl StructuralPartialEq for ToastProps
Auto Trait Implementations§
impl Freeze for ToastProps
impl RefUnwindSafe for ToastProps
impl Send for ToastProps
impl Sync for ToastProps
impl Unpin for ToastProps
impl UnsafeUnpin for ToastProps
impl UnwindSafe for ToastProps
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