pub struct Server<T: Transport> { /* private fields */ }
Expand description
A sender for a server endpoint.
Implementations§
Source§impl<T: Transport> Server<T>
impl<T: Transport> Server<T>
Sourcepub fn new(transport: T) -> (Self, ServerDispatcher<T>)
pub fn new(transport: T) -> (Self, ServerDispatcher<T>)
Creates a new server and dispatcher from a transport.
Sourcepub fn send_event<M>(
&self,
ordinal: u64,
event: &mut M,
) -> Result<T::SendFuture<'_>, EncodeError>
pub fn send_event<M>( &self, ordinal: u64, event: &mut M, ) -> Result<T::SendFuture<'_>, EncodeError>
Send an event.
Sourcepub fn send_response<M>(
&self,
responder: Responder,
ordinal: u64,
response: &mut M,
) -> Result<T::SendFuture<'_>, EncodeError>
pub fn send_response<M>( &self, responder: Responder, ordinal: u64, response: &mut M, ) -> Result<T::SendFuture<'_>, EncodeError>
Send a response to a transactional request.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Server<T>
impl<T> RefUnwindSafe for Server<T>
impl<T> Send for Server<T>
impl<T> Sync for Server<T>
impl<T> Unpin for Server<T>
impl<T> UnwindSafe for Server<T>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)