pub trait AlertPluginInterface<T, U>where
    T: Debug + Clone + RespoAction,
    U: Fn(DispatchFn<T>) -> Result<(), String>,
{ fn render(&self) -> Result<RespoNode<T>, String>
    where
        T: Clone + Debug
; fn show(
        &self,
        dispatch: DispatchFn<T>,
        text: Option<String>
    ) -> Result<(), String>; fn close(&self, dispatch: DispatchFn<T>) -> Result<(), String>; fn new(
        states: StatesTree,
        options: AlertOptions,
        on_read: U
    ) -> Result<Self, String>
    where
        Self: Sized
; fn share_with_ref(&self) -> Rc<Self>; }
Expand description

provides the interfaces to component of alert dialog

Required Methods§

renders virtual dom for alert modal

to show alert, second parameter is a message that could overwrite the default message

to close alert

show alert with options, on_read is the callback function when read button is clicked

return referencial counted alert plugin

Implementors§