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§
Source§impl Drop for TimeoutGuard
impl Drop for TimeoutGuard
Auto Trait Implementations§
impl Freeze for TimeoutGuard
impl RefUnwindSafe for TimeoutGuard
impl Send for TimeoutGuard
impl Sync for TimeoutGuard
impl Unpin for TimeoutGuard
impl UnsafeUnpin 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