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 more