Trait ambient_api::prelude::RuntimeMessage
source · pub trait RuntimeMessage: Message {
// Provided method
fn subscribe<R>(callback: impl FnMut(Self) -> R + 'static) -> Listener
where R: CallbackReturn { ... }
}
Expand description
Implemented by all messages sent from the runtime.
Provided Methods§
sourcefn subscribe<R>(callback: impl FnMut(Self) -> R + 'static) -> Listenerwhere
R: CallbackReturn,
fn subscribe<R>(callback: impl FnMut(Self) -> R + 'static) -> Listenerwhere
R: CallbackReturn,
Subscribes to this Message. Wrapper around self::subscribe.
Object Safety§
This trait is not object safe.