pub struct RuntimeEventBridgeHandle { /* private fields */ }Expand description
Handle to a running RuntimeEventBridge task.
Dropping the handle aborts the task. Call RuntimeEventBridgeHandle::abort
to stop it explicitly, or RuntimeEventBridgeHandle::join to await
completion.
Implementations§
Source§impl RuntimeEventBridgeHandle
impl RuntimeEventBridgeHandle
Sourcepub fn abort(&self)
pub fn abort(&self)
Aborts the bridge task.
Idempotent and safe to call from any thread. After abort,
join returns RuntimeEventBridgeError::Cancelled.
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Returns true once the bridge task has finished.
Sourcepub async fn join(self) -> Result<(), RuntimeEventBridgeError>
pub async fn join(self) -> Result<(), RuntimeEventBridgeError>
Awaits task completion.
§Errors
Returns RuntimeEventBridgeError::Cancelled if the task was
aborted, and RuntimeEventBridgeError::TaskPanic if it exited
unexpectedly (e.g. panic).
Trait Implementations§
Source§impl Drop for RuntimeEventBridgeHandle
impl Drop for RuntimeEventBridgeHandle
Auto Trait Implementations§
impl Freeze for RuntimeEventBridgeHandle
impl RefUnwindSafe for RuntimeEventBridgeHandle
impl Send for RuntimeEventBridgeHandle
impl Sync for RuntimeEventBridgeHandle
impl Unpin for RuntimeEventBridgeHandle
impl UnsafeUnpin for RuntimeEventBridgeHandle
impl UnwindSafe for RuntimeEventBridgeHandle
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