Struct vaas::cancellation::CancellationToken
source · pub struct CancellationToken {
pub duration: Duration,
}
Expand description
The CancellationToken
allows to cancel a request after a specific time
if no response was received from the server.
Fields§
§duration: Duration
Duration after which the request is cancelled.
Implementations§
source§impl CancellationToken
impl CancellationToken
sourcepub fn from_seconds(secs: u64) -> Self
pub fn from_seconds(secs: u64) -> Self
Create a new CancellationToken
from seconds.
sourcepub fn from_minutes(mins: u64) -> Self
pub fn from_minutes(mins: u64) -> Self
Create a new CancellationToken
from minutes.
Auto Trait Implementations§
impl Freeze for CancellationToken
impl RefUnwindSafe for CancellationToken
impl Send for CancellationToken
impl Sync for CancellationToken
impl Unpin for CancellationToken
impl UnwindSafe for CancellationToken
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