pub struct SharedSubscription { /* private fields */ }Implementations§
Trait Implementations§
Source§fn clone(&self) -> SharedSubscription
fn clone(&self) -> SharedSubscription
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§fn default() -> SharedSubscription
fn default() -> SharedSubscription
Returns the “default value” for a type. Read more
Source§fn is_closed(&self) -> bool
fn is_closed(&self) -> bool
Returns if the subscription is closed or not. A subscription can be
closed by calling unsubscribe on it. Some special subscriptions made
by observables that only ever emit values during subscribe, will produce
subscriptions that are created closed. Read more
Source§fn unsubscribe(&mut self)
fn unsubscribe(&mut self)
Releases all resources associated with this subscription, and marks it
as closed. Read more
Source§fn add_teardown(&mut self, teardown: Teardown)
fn add_teardown(&mut self, teardown: Teardown)
Add additional teardowns to execute on unsubscribe. If the subscription
is already closed, the added teardown is immediately executed!
Auto Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> EraseSubscriptionExtension for S
impl<S> EraseSubscriptionExtension for S
fn erase(self) -> ErasedSubscription
Wrap this subscription into a SharedSubscription, erasing it and
allowing you to freely clone it, to unsubscribe it from multiple places.