pub trait DispatchLocalServerMessage<H, T>: Sized + 'staticwhere
T: Transport,{
// Required methods
fn on_one_way(
handler: &mut H,
message: Message<T>,
) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::Error>>>;
fn on_two_way(
handler: &mut H,
message: Message<T>,
responder: Responder<T>,
) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::Error>>>;
}Expand description
A protocol which dispatches incoming server messages to a local handler.
This is a variant of DispatchServerMessage that does not require
implementing Send and only supports local-thread executors.
Required Methods§
Sourcefn on_one_way(
handler: &mut H,
message: Message<T>,
) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::Error>>>
fn on_one_way( handler: &mut H, message: Message<T>, ) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::Error>>>
Handles a received server one-way message with the given handler.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".