pub trait UserFeedback:
Send
+ Sync
+ 'static {
// Required methods
fn show_toast(&self, options: ToastOptions) -> Result<(), PlatformError>;
fn hide_toast(&self) -> Result<(), PlatformError>;
fn show_modal(
&self,
options: ModalOptions,
) -> impl Future<Output = Result<String, PlatformError>> + Send;
fn show_action_sheet(
&self,
options: Vec<String>,
cancel_text: String,
item_color: String,
) -> impl Future<Output = Result<String, PlatformError>> + Send;
}Required Methods§
fn show_toast(&self, options: ToastOptions) -> Result<(), PlatformError>
fn hide_toast(&self) -> Result<(), PlatformError>
fn show_modal( &self, options: ModalOptions, ) -> impl Future<Output = Result<String, PlatformError>> + Send
fn show_action_sheet( &self, options: Vec<String>, cancel_text: String, item_color: String, ) -> impl Future<Output = Result<String, PlatformError>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.