pub struct CancelToken { /* private fields */ }Expand description
A token that can be used to cancel a running query. This token is safe to send across threads and does not borrow the connection.
Implementations§
Source§impl CancelToken
impl CancelToken
Sourcepub async fn cancel_query(&self) -> PgResult<()>
pub async fn cancel_query(&self) -> PgResult<()>
Attempt to cancel the ongoing query. This opens a new TCP connection and sends a CancelRequest message.
Trait Implementations§
Source§impl Clone for CancelToken
impl Clone for CancelToken
Source§fn clone(&self) -> CancelToken
fn clone(&self) -> CancelToken
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CancelToken
impl RefUnwindSafe for CancelToken
impl Send for CancelToken
impl Sync for CancelToken
impl Unpin for CancelToken
impl UnwindSafe for CancelToken
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