Struct nats::subscription::Handler [−][src]
pub struct Handler { /* fields omitted */ }
A Handler
may be used to unsubscribe a handler thread.
Implementations
impl Handler
[src]
impl Handler
[src]pub fn unsubscribe(self) -> Result<()>
[src]
Unsubscribe a subscription.
Example
let sub = nc.subscribe("foo")?.with_handler(move |msg| { println!("Received {}", &msg); Ok(()) }); sub.unsubscribe()?;
Auto Trait Implementations
impl !RefUnwindSafe for Handler
impl !RefUnwindSafe for Handler
impl !UnwindSafe for Handler
impl !UnwindSafe for Handler