pub struct CancellationTokenSource { /* private fields */ }Expand description
Signals to one or more CancellationTokens that they should be
canceled.
Implementations§
Source§impl CancellationTokenSource
impl CancellationTokenSource
pub fn new() -> CancellationTokenSource
Sourcepub fn token(&self) -> CancellationToken
pub fn token(&self) -> CancellationToken
The token observing this source.
pub fn is_cancellation_requested(&self) -> bool
Trait Implementations§
Source§impl Clone for CancellationTokenSource
impl Clone for CancellationTokenSource
Source§fn clone(&self) -> CancellationTokenSource
fn clone(&self) -> CancellationTokenSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for CancellationTokenSource
impl Default for CancellationTokenSource
Source§fn default() -> CancellationTokenSource
fn default() -> CancellationTokenSource
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CancellationTokenSource
impl RefUnwindSafe for CancellationTokenSource
impl Send for CancellationTokenSource
impl Sync for CancellationTokenSource
impl Unpin for CancellationTokenSource
impl UnsafeUnpin for CancellationTokenSource
impl UnwindSafe for CancellationTokenSource
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more