pub trait Service:
Sized
+ Send
+ Sync
+ 'static {
type Message: Send + 'static;
type ClientMethods: ClientMethods<Self>;
// Required methods
fn create(app: &App) -> Self;
fn handle(
self: Arc<Self>,
msg: Self::Message,
) -> impl Future<Output = ()> + Send;
}Required Associated Types§
type Message: Send + 'static
type ClientMethods: ClientMethods<Self>
Required Methods§
fn create(app: &App) -> Self
fn handle( self: Arc<Self>, msg: Self::Message, ) -> impl Future<Output = ()> + 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.