pub trait ServerProtocol<H, T: Transport = Channel>: Sized + 'static {
// Required methods
fn on_one_way(
handler: &mut H,
server: &ServerSender<Self, T>,
ordinal: u64,
buffer: T::RecvBuffer,
) -> impl Future<Output = ()> + Send;
fn on_two_way(
handler: &mut H,
server: &ServerSender<Self, T>,
ordinal: u64,
buffer: T::RecvBuffer,
responder: Responder,
) -> impl Future<Output = ()> + Send;
}
Expand description
A protocol which supports servers.
Required Methods§
Sourcefn on_one_way(
handler: &mut H,
server: &ServerSender<Self, T>,
ordinal: u64,
buffer: T::RecvBuffer,
) -> impl Future<Output = ()> + Send
fn on_one_way( handler: &mut H, server: &ServerSender<Self, T>, ordinal: u64, buffer: T::RecvBuffer, ) -> impl Future<Output = ()> + Send
Handles a received server one-way message with the given handler.
Sourcefn on_two_way(
handler: &mut H,
server: &ServerSender<Self, T>,
ordinal: u64,
buffer: T::RecvBuffer,
responder: Responder,
) -> impl Future<Output = ()> + Send
fn on_two_way( handler: &mut H, server: &ServerSender<Self, T>, ordinal: u64, buffer: T::RecvBuffer, responder: Responder, ) -> impl Future<Output = ()> + Send
Handles a received server two-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", so this trait is not object safe.