Struct respo::dialog::PromptPlugin
source · pub struct PromptPlugin<T, U>where
T: Clone + Debug,
U: Fn(String, DispatchFn<T>) -> Result<(), String> + 'static,{ /* private fields */ }
Expand description
a dialog for prompt, request for some input, and submit
Trait Implementations§
source§impl<T, U> Clone for PromptPlugin<T, U>where
T: Clone + Debug + Clone,
U: Fn(String, DispatchFn<T>) -> Result<(), String> + 'static + Clone,
impl<T, U> Clone for PromptPlugin<T, U>where
T: Clone + Debug + Clone,
U: Fn(String, DispatchFn<T>) -> Result<(), String> + 'static + Clone,
source§fn clone(&self) -> PromptPlugin<T, U>
fn clone(&self) -> PromptPlugin<T, U>
Returns a copy 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<T, U> Debug for PromptPlugin<T, U>where
T: Clone + Debug + Debug,
U: Fn(String, DispatchFn<T>) -> Result<(), String> + 'static + Debug,
impl<T, U> Debug for PromptPlugin<T, U>where
T: Clone + Debug + Debug,
U: Fn(String, DispatchFn<T>) -> Result<(), String> + 'static + Debug,
source§impl<T, U> PromptPluginInterface<T, U> for PromptPlugin<T, U>where
T: Clone + Debug + RespoAction,
U: Fn(String, DispatchFn<T>) -> Result<(), String> + 'static + Copy,
impl<T, U> PromptPluginInterface<T, U> for PromptPlugin<T, U>where
T: Clone + Debug + RespoAction,
U: Fn(String, DispatchFn<T>) -> Result<(), String> + 'static + Copy,
source§fn show<V>(&self, dispatch: DispatchFn<T>, next_task: V) -> Result<(), String>where
V: Fn(String) -> Result<(), String> + 'static,
fn show<V>(&self, dispatch: DispatchFn<T>, next_task: V) -> Result<(), String>where
V: Fn(String) -> Result<(), String> + 'static,
to show prompt dialog, second parameter is the callback task when the dialog is read,
the callback is stored in a dirty to provide syntax sugar
source§fn new(
states: StatesTree,
options: PromptOptions,
on_submit: U
) -> Result<Self, String>
fn new(
states: StatesTree,
options: PromptOptions,
on_submit: U
) -> Result<Self, String>
initialize the plugin, second parameter is the callback task when submitted,
shared it in
Rc