pub struct ToastData {
pub element: Html,
pub duration: u32,
pub close: bool,
pub gravity: Gravity,
pub position: Position,
pub onclick: Callback<()>,
}Expand description
The data needed to render a toast
§Properties
element: The HTML element to render inside the toastduration: The duration of the toast in millisecondsclose: Whether the toast should close when clickedgravity: The vertical position of the toastposition: The horizontal position of the toastonclick: The callback to be called when the toast is clicked
Setting close to true will override the onclick callback.
Fields§
§element: HtmlThe HTML element to render inside the toast
duration: u32The duration of the toast in milliseconds
close: boolWhether the toast should close when clicked
gravity: GravityThe vertical position of the toast
position: PositionThe horizontal position of the toast
onclick: Callback<()>The callback to be called when the toast is clicked
Trait Implementations§
impl StructuralPartialEq for ToastData
Auto Trait Implementations§
impl Freeze for ToastData
impl !RefUnwindSafe for ToastData
impl !Send for ToastData
impl !Sync for ToastData
impl Unpin for ToastData
impl !UnwindSafe for ToastData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.