pub struct CancellationTokenSource { /* private fields */ }Implementations§
Source§impl CancellationTokenSource
impl CancellationTokenSource
pub fn new() -> Self
pub fn token(&self) -> CancellationToken
pub fn cancel(&self)
pub fn is_cancelled(&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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CancellationTokenSource
impl !RefUnwindSafe for CancellationTokenSource
impl !Send for CancellationTokenSource
impl !Sync for CancellationTokenSource
impl Unpin 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