pub struct Session { /* private fields */ }
Expand description
information about session. used for canceling query
Implementations§
Source§impl Session
impl Session
Sourcepub async fn query_cancel(self) -> Result<(), Error>
pub async fn query_cancel(self) -> Result<(), Error>
Attempts to cancel the in-progress query on the connection associated with Self.
The server provides no information about whether a cancellation attempt was successful or not. An error will only be returned if the client was unable to connect to the database.
Cancellation is inherently racy. There is no guarantee that the cancellation request will reach the server before the query terminates normally, or that the connection associated with this token is still active.
Sourcepub fn query_cancel_blocking(self) -> Result<(), Error>
pub fn query_cancel_blocking(self) -> Result<(), Error>
blocking version of Session::query_cancel
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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