pub struct ToastifyOptions {
pub text: String,
pub duration: u32,
pub destination: Option<String>,
pub close: bool,
pub gravity: Gravity,
pub position: Position,
pub new_window: bool,
pub stop_on_focus: bool,
pub class_name: Option<String>,
pub style: Object,
pub on_click: JsValue,
}Fields§
§text: String§duration: u32§destination: Option<String>§close: bool§gravity: Gravity§position: Position§new_window: bool§stop_on_focus: bool§class_name: Option<String>§style: Object§on_click: JsValueImplementations§
Source§impl ToastifyOptions
impl ToastifyOptions
Sourcepub fn add_style(
self,
style_property: &str,
value: &str,
) -> Result<Self, JsValue>
pub fn add_style( self, style_property: &str, value: &str, ) -> Result<Self, JsValue>
Add a style property to the toast Style properties match HTML DOM styles
§Errors
Returns an error if the style property is not a valid HTML DOM style
pub fn add_on_click<T>(self, callback: T) -> Selfwhere
T: Fn(),
pub fn show(self)
Trait Implementations§
Source§impl Clone for ToastifyOptions
impl Clone for ToastifyOptions
Source§fn clone(&self) -> ToastifyOptions
fn clone(&self) -> ToastifyOptions
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 ToastifyOptions
impl Debug for ToastifyOptions
Source§impl Default for ToastifyOptions
impl Default for ToastifyOptions
Source§impl From<ToastifyOptions> for JsValue
impl From<ToastifyOptions> for JsValue
Source§fn from(val: ToastifyOptions) -> Self
fn from(val: ToastifyOptions) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ToastifyOptions
impl RefUnwindSafe for ToastifyOptions
impl !Send for ToastifyOptions
impl !Sync for ToastifyOptions
impl Unpin for ToastifyOptions
impl UnwindSafe for ToastifyOptions
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