Struct Subscription
pub struct Subscription { /* private fields */ }Expand description
A live event subscription. Drop to unsubscribe.
Subscription is Send but not Clone. It can be moved to another
thread but not shared.
Implementations§
§impl Subscription
impl Subscription
pub fn new(rx: EventReceiver, cancel: CancelHandle) -> Subscription
pub fn new(rx: EventReceiver, cancel: CancelHandle) -> Subscription
Create a new subscription from its components.
Auto Trait Implementations§
impl Freeze for Subscription
impl !RefUnwindSafe for Subscription
impl Send for Subscription
impl !Sync for Subscription
impl Unpin for Subscription
impl !UnwindSafe for Subscription
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