pub struct ServerAdapter<P, H> { /* private fields */ }
Expand description
An adapter for a server protocol handler.
Implementations§
Source§impl<P, H> ServerAdapter<P, H>
impl<P, H> ServerAdapter<P, H>
Sourcepub fn from_untyped(handler: H) -> Self
pub fn from_untyped(handler: H) -> Self
Creates a new protocol server handler from a supported handler.
Trait Implementations§
Source§impl<T, P, H> ServerHandler<T> for ServerAdapter<P, H>where
T: Transport,
P: ServerProtocol<T, H>,
impl<T, P, H> ServerHandler<T> for ServerAdapter<P, H>where
T: Transport,
P: ServerProtocol<T, H>,
Source§fn on_event(&mut self, ordinal: u64, buffer: T::RecvBuffer)
fn on_event(&mut self, ordinal: u64, buffer: T::RecvBuffer)
Handles a received server event. Read more
Source§fn on_transaction(
&mut self,
ordinal: u64,
buffer: <T as Transport>::RecvBuffer,
responder: Responder,
)
fn on_transaction( &mut self, ordinal: u64, buffer: <T as Transport>::RecvBuffer, responder: Responder, )
Handles a received server transaction. Read more
Auto Trait Implementations§
impl<P, H> Freeze for ServerAdapter<P, H>where
H: Freeze,
impl<P, H> RefUnwindSafe for ServerAdapter<P, H>where
H: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, H> Send for ServerAdapter<P, H>
impl<P, H> Sync for ServerAdapter<P, H>
impl<P, H> Unpin for ServerAdapter<P, H>
impl<P, H> UnwindSafe for ServerAdapter<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