Struct websocket_util::subscribe::Subscription [−][src]
pub struct Subscription<S, M, I> where
M: Message, { /* fields omitted */ }Expand description
A subscription associated with a MessageStream that allows for
sending and receiving control messages over it.
Notes
- in order for any
sendoperation to resolve, the associatedMessageStreamstream needs to be polled; that is necessary because this operation expects a control message response and that control message comes through the regular stream.
Implementations
Send a message over the internal control channel and wait a control message response.
The method returns the following errors:
Err(..)when the sink failed to send an itemOk(None)when the message stream got closedOk(Some(Err(())))when message classification reported an error; the actual error still manifests through the message stream
Trait Implementations
Auto Trait Implementations
impl<S, M, I> RefUnwindSafe for Subscription<S, M, I> where
I: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, M, I> Send for Subscription<S, M, I> where
I: Send,
S: Send,
<M as Message>::ControlMessage: Send,
impl<S, M, I> Sync for Subscription<S, M, I> where
I: Sync,
S: Sync,
<M as Message>::ControlMessage: Send,
impl<S, M, I> Unpin for Subscription<S, M, I> where
I: Unpin,
S: Unpin,
impl<S, M, I> UnwindSafe for Subscription<S, M, I> where
I: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
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
