pub struct CancellationToken { /* private fields */ }Expand description
Cloneable cooperative cancellation shared by a running proxy and backend work started for that proxy generation.
Implementations§
Source§impl CancellationToken
impl CancellationToken
pub fn new() -> Self
pub fn is_cancelled(&self) -> bool
Sourcepub fn wait_cancelled_timeout(&self, timeout: Duration) -> bool
pub fn wait_cancelled_timeout(&self, timeout: Duration) -> bool
Waits until cancellation or the timeout. Returns whether cancellation was observed.
Trait Implementations§
Source§impl Clone for CancellationToken
impl Clone for CancellationToken
Source§impl Debug for CancellationToken
impl Debug for CancellationToken
Auto Trait Implementations§
impl Freeze for CancellationToken
impl RefUnwindSafe for CancellationToken
impl Send for CancellationToken
impl Sync for CancellationToken
impl Unpin for CancellationToken
impl UnsafeUnpin for CancellationToken
impl UnwindSafe for CancellationToken
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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