pub struct ServerHandlerToProtocolAdapter<P, H> { /* private fields */ }Expand description
An adapter for a server protocol handler.
Implementations§
Source§impl<P, H> ServerHandlerToProtocolAdapter<P, H>
impl<P, H> ServerHandlerToProtocolAdapter<P, H>
Sourcepub fn from_untyped(handler: H) -> ServerHandlerToProtocolAdapter<P, H>
pub fn from_untyped(handler: H) -> ServerHandlerToProtocolAdapter<P, H>
Creates a new protocol server handler from a supported handler.
Trait Implementations§
Source§impl<P, H, T> LocalServerHandler<T> for ServerHandlerToProtocolAdapter<P, H>where
P: DispatchLocalServerMessage<H, T>,
T: Transport,
impl<P, H, T> LocalServerHandler<T> for ServerHandlerToProtocolAdapter<P, H>where
P: DispatchLocalServerMessage<H, T>,
T: Transport,
Source§fn on_one_way(
&mut self,
ordinal: u64,
flexibility: Flexibility,
body: Body<T>,
) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::Error>>>
fn on_one_way( &mut self, ordinal: u64, flexibility: Flexibility, body: Body<T>, ) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::Error>>>
Handles a received one-way server message. Read more
Source§fn on_two_way(
&mut self,
ordinal: u64,
flexibility: Flexibility,
body: Body<T>,
responder: Responder<T>,
) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::Error>>>
fn on_two_way( &mut self, ordinal: u64, flexibility: Flexibility, body: Body<T>, responder: Responder<T>, ) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::Error>>>
Handles a received two-way server message. Read more
Source§impl<P, H, T> ServerHandler<T> for ServerHandlerToProtocolAdapter<P, H>
impl<P, H, T> ServerHandler<T> for ServerHandlerToProtocolAdapter<P, H>
Source§fn on_one_way(
&mut self,
ordinal: u64,
flexibility: Flexibility,
body: Body<T>,
) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::Error>>> + Send
fn on_one_way( &mut self, ordinal: u64, flexibility: Flexibility, body: Body<T>, ) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::Error>>> + Send
Handles a received one-way server message. Read more
Source§fn on_two_way(
&mut self,
ordinal: u64,
flexibility: Flexibility,
body: Body<T>,
responder: Responder<T>,
) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::Error>>> + Send
fn on_two_way( &mut self, ordinal: u64, flexibility: Flexibility, body: Body<T>, responder: Responder<T>, ) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::Error>>> + Send
Handles a received two-way server message. Read more
impl<P, H> Send for ServerHandlerToProtocolAdapter<P, H>where
H: Send,
Auto Trait Implementations§
impl<P, H> Freeze for ServerHandlerToProtocolAdapter<P, H>where
H: Freeze,
impl<P, H> RefUnwindSafe for ServerHandlerToProtocolAdapter<P, H>where
H: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, H> Sync for ServerHandlerToProtocolAdapter<P, H>
impl<P, H> Unpin for ServerHandlerToProtocolAdapter<P, H>
impl<P, H> UnwindSafe for ServerHandlerToProtocolAdapter<P, H>where
H: UnwindSafe,
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
Source§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to Self