Skip to main content

UiState

Trait UiState 

Source
pub trait UiState {
    type Error: Into<Error> + Send + Sync + 'static;

    // Required methods
    async fn get_event(&mut self) -> Result<Event, Self::Error>;
    fn notify(&mut self, notification: Notification) -> Result<(), Self::Error>;
}
Expand description

UI state for interacting with the llimorse-chat application

Required Associated Types§

Source

type Error: Into<Error> + Send + Sync + 'static

Error type for the implementing struct.

Required Methods§

Source

async fn get_event(&mut self) -> Result<Event, Self::Error>

Await an event on the UI.

Source

fn notify(&mut self, notification: Notification) -> Result<(), Self::Error>

Notify the UI about something.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§