Trait kludgine::app::Application
source · pub trait Application<AppMessage>: ApplicationSealed<AppMessage>where
AppMessage: Message,{
// Required methods
fn app(&self) -> App<AppMessage>;
fn send(
&mut self,
message: AppMessage
) -> Option<<AppMessage as Message>::Response>;
}
Expand description
A type that has a handle to the application thread.
Required Methods§
sourcefn send(
&mut self,
message: AppMessage
) -> Option<<AppMessage as Message>::Response>
fn send( &mut self, message: AppMessage ) -> Option<<AppMessage as Message>::Response>
Sends an app message to the main event loop to be handled by the callback provided when the app was created.
This function will return None if the main event loop is no longer running. Otherwise, this function will block until the result of the callback has been received.