Struct hrpc::server::Socket [−][src]
pub struct Socket<Req, Resp> where
Req: Message + Default + 'static,
Resp: Message + 'static, { /* fields omitted */ }
Expand description
A web socket.
Implementations
Receive a message from the socket.
Returns Err(SocketError::ClosedNormally)
if the socket is closed normally.
This will block until getting a message if the socket is not closed.
Send a message over the socket.
This will block if the inner send buffer is filled.
Trait Implementations
Auto Trait Implementations
impl<Req, Resp> !RefUnwindSafe for Socket<Req, Resp>
impl<Req, Resp> !UnwindSafe for Socket<Req, Resp>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Convert this to a request.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more