pub struct TransferControl { /* private fields */ }Expand description
Shared cancellation/deadline for all bounded workers; never starts background tasks.
Implementations§
Source§impl TransferControl
impl TransferControl
Sourcepub fn new(timeout: Duration) -> TransferResult<Self>
pub fn new(timeout: Duration) -> TransferResult<Self>
Creates a deadline between 1 ms and 24 hours.
Sourcepub fn cancel(&self)
pub fn cancel(&self)
Requests cooperative cancellation; providers must return within their I/O bounds.
Sourcepub fn checkpoint(&self) -> TransferResult<()>
pub fn checkpoint(&self) -> TransferResult<()>
Returns a typed cancellation/deadline failure.
Trait Implementations§
Source§impl Clone for TransferControl
impl Clone for TransferControl
Auto Trait Implementations§
impl Freeze for TransferControl
impl RefUnwindSafe for TransferControl
impl Send for TransferControl
impl Sync for TransferControl
impl Unpin for TransferControl
impl UnsafeUnpin for TransferControl
impl UnwindSafe for TransferControl
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