Struct pub_sub::Subscription
[−]
[src]
pub struct Subscription<T: Clone> { /* fields omitted */ }
Subscription to a pub/sub channel
Methods
impl<T: Clone> Subscription<T>
[src]
fn recv(&self) -> Result<T, RecvError>
Receives a single message. Blocks until a message is available.
fn try_recv(&self) -> Result<T, TryRecvError>
Tries to receive a single message, not blocking if one is not available.
fn iter(&self) -> Iter<T>
Creates an iterator that will block waiting for messages.
Trait Implementations
impl<T: Clone> Drop for Subscription<T>
[src]
fn drop(&mut self)
Remove our sender ID from the sender list.
impl<T: Clone> Clone for Subscription<T>
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more