pub struct SubscriptionHandle<StoreError>where
StoreError: Error + 'static,{ /* private fields */ }Expand description
Handle to a running subscription.
Dropping the handle sends a best-effort stop signal. Call stop() for
graceful shutdown and to observe task errors.
Implementations§
Source§impl<StoreError> SubscriptionHandle<StoreError>where
StoreError: Error + 'static,
impl<StoreError> SubscriptionHandle<StoreError>where
StoreError: Error + 'static,
Sourcepub async fn stop(self) -> Result<(), SubscriptionError<StoreError>>
pub async fn stop(self) -> Result<(), SubscriptionError<StoreError>>
Stop the subscription gracefully and wait for it to finish.
§Errors
Returns the subscription’s error if it failed before being stopped.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if the subscription task is still running.
Trait Implementations§
Auto Trait Implementations§
impl<StoreError> Freeze for SubscriptionHandle<StoreError>
impl<StoreError> !RefUnwindSafe for SubscriptionHandle<StoreError>
impl<StoreError> Send for SubscriptionHandle<StoreError>where
StoreError: Send,
impl<StoreError> Sync for SubscriptionHandle<StoreError>where
StoreError: Send,
impl<StoreError> Unpin for SubscriptionHandle<StoreError>
impl<StoreError> !UnwindSafe for SubscriptionHandle<StoreError>
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