pub struct FfiCancellationSource { /* private fields */ }Expand description
FFI-safe cancellation source.
This is the type that should be created and destroyed across FFI. It owns a reference to the shared cancellation state.
Create with enough_cancellation_create, destroy with
enough_cancellation_destroy.
Safety: This type uses Arc internally. Destroying the source while
tokens exist is safe - tokens will continue to work but can never become
cancelled.
Implementations§
Source§impl FfiCancellationSource
impl FfiCancellationSource
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Check if cancelled.
Auto Trait Implementations§
impl Freeze for FfiCancellationSource
impl RefUnwindSafe for FfiCancellationSource
impl Send for FfiCancellationSource
impl Sync for FfiCancellationSource
impl Unpin for FfiCancellationSource
impl UnwindSafe for FfiCancellationSource
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