pub struct Server<P, S, R, E>(/* private fields */);
Expand description
Implementations§
source§impl<P, S, R, E> Server<P, S, R, E>
impl<P, S, R, E> Server<P, S, R, E>
sourcepub fn wait(&self) -> Result<MsgType<P, S, R, E>, Error<E>>
pub fn wait(&self) -> Result<MsgType<P, S, R, E>, Error<E>>
Block and wait, indefinitely, for an incoming message from a
Client
.
Returns the message sent by the client and a reply context. The server
must call ReplyContext::reply()
on the reply context to pass a return
value to the client.
sourcepub fn try_pop(&self) -> Result<Option<MsgType<P, S, R, E>>, Error<E>>
pub fn try_pop(&self) -> Result<Option<MsgType<P, S, R, E>>, Error<E>>
Take next next message off queue or return None
is queue is empty.
sourcepub async fn async_wait(&self) -> Result<MsgType<P, S, R, E>, Error<E>>
pub async fn async_wait(&self) -> Result<MsgType<P, S, R, E>, Error<E>>
Same as Server::wait()
, but for use in an async
context.
Auto Trait Implementations§
impl<P, S, R, E> !RefUnwindSafe for Server<P, S, R, E>
impl<P, S, R, E> Send for Server<P, S, R, E>
impl<P, S, R, E> Sync for Server<P, S, R, E>
impl<P, S, R, E> Unpin for Server<P, S, R, E>
impl<P, S, R, E> !UnwindSafe for Server<P, S, R, E>
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