pub struct AbortHandle { /* private fields */ }Expand description
A cheap, cloneable handle that cancels whatever statement a
SnowflakeSession is currently running.
It shares the session’s in-flight slot and transport (both Arc), so it stays
valid after the session itself is checked out of a pool (moved out of the
pool’s slot) — which is the only way a concurrent cancel can reach a busy
session. abort is a no-op (returns Ok(false)) when nothing
is running.
Implementations§
Source§impl AbortHandle
impl AbortHandle
Sourcepub async fn abort(&self) -> Result<bool>
pub async fn abort(&self) -> Result<bool>
Aborts the session’s in-flight statement via queries/v1/abort-request.
Returns Ok(true) when an abort was issued for a running statement,
Ok(false) when nothing was running or the server reported nothing to
abort (e.g. the query already finished). The abort call uses a fresh
requestId and is authorized by the running statement’s session token.
§Errors
A transport error, or Error::SessionExpired if the session token that
authorized the running statement has itself lapsed.
Trait Implementations§
Source§impl Clone for AbortHandle
impl Clone for AbortHandle
Source§fn clone(&self) -> AbortHandle
fn clone(&self) -> AbortHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AbortHandle
impl !UnwindSafe for AbortHandle
impl Freeze for AbortHandle
impl Send for AbortHandle
impl Sync for AbortHandle
impl Unpin for AbortHandle
impl UnsafeUnpin for AbortHandle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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