Skip to main content

UserFeedback

Trait UserFeedback 

Source
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§

Source

fn show_toast(&self, options: ToastOptions) -> Result<(), PlatformError>

Source

fn hide_toast(&self) -> Result<(), PlatformError>

Source

fn show_modal( &self, options: ModalOptions, ) -> impl Future<Output = Result<String, PlatformError>> + Send

Source

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.

Implementors§