pub struct AsyncQueryContext {
pub deadline: Option<Instant>,
pub cancellation: AsyncCancellationToken,
}Fields§
§deadline: Option<Instant>§cancellation: AsyncCancellationTokenImplementations§
Source§impl AsyncQueryContext
impl AsyncQueryContext
pub fn with_timeout_ms(self, timeout_ms: u64) -> Self
pub fn with_deadline(self, deadline: Instant) -> Self
pub fn with_cancellation_token(self, token: AsyncCancellationToken) -> Self
pub fn is_cancelled(&self) -> bool
pub fn is_deadline_exceeded(&self) -> bool
pub fn ensure_active(&self) -> DataResult<()>
Trait Implementations§
Source§impl Clone for AsyncQueryContext
impl Clone for AsyncQueryContext
Source§fn clone(&self) -> AsyncQueryContext
fn clone(&self) -> AsyncQueryContext
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 Debug for AsyncQueryContext
impl Debug for AsyncQueryContext
Source§impl Default for AsyncQueryContext
impl Default for AsyncQueryContext
Source§fn default() -> AsyncQueryContext
fn default() -> AsyncQueryContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AsyncQueryContext
impl RefUnwindSafe for AsyncQueryContext
impl Send for AsyncQueryContext
impl Sync for AsyncQueryContext
impl Unpin for AsyncQueryContext
impl UnsafeUnpin for AsyncQueryContext
impl UnwindSafe for AsyncQueryContext
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