pub struct TimeoutGuard { /* private fields */ }Expand description
Guard that automatically cancels a query after a timeout. Uses a global timeout manager for efficient handling of many concurrent timeouts.
Implementations§
Source§impl TimeoutGuard
impl TimeoutGuard
Sourcepub fn new(ctx: &ExecutionContext) -> Option<Self>
pub fn new(ctx: &ExecutionContext) -> Option<Self>
Create a new timeout guard that will cancel the query after timeout_ms. Returns None if timeout_ms is 0 (no timeout).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimeoutGuard
impl RefUnwindSafe for TimeoutGuard
impl Send for TimeoutGuard
impl Sync for TimeoutGuard
impl Unpin for TimeoutGuard
impl UnwindSafe for TimeoutGuard
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more