pub trait ClientExt: Sized {
// Required methods
fn ping(&self) -> impl Future<Output = Result<()>> + Send;
fn kill_query(
&self,
query_id: &str,
) -> impl Future<Output = Result<()>> + Send;
fn with_query_id(self, query_id: impl Into<String>) -> Self;
fn with_session_id(self, session_id: impl Into<String>) -> Self;
fn with_role(self, role: impl Into<String>) -> Self;
}Available on crate feature
ext only.Expand description
Statement-level controls upstream’s Client carries only as raw settings.
Sized because the with_* methods consume and return the client.
Required Methods§
Sourcefn ping(&self) -> impl Future<Output = Result<()>> + Send
fn ping(&self) -> impl Future<Output = Result<()>> + Send
SELECT 1; errors on a transport failure or a bad credential.
Sourcefn kill_query(&self, query_id: &str) -> impl Future<Output = Result<()>> + Send
fn kill_query(&self, query_id: &str) -> impl Future<Output = Result<()>> + Send
Stop query_id and wait; matching nothing is not an error.
Sourcefn with_query_id(self, query_id: impl Into<String>) -> Self
fn with_query_id(self, query_id: impl Into<String>) -> Self
What system.query_log records and Self::kill_query matches on.
Sourcefn with_session_id(self, session_id: impl Into<String>) -> Self
fn with_session_id(self, session_id: impl Into<String>) -> Self
Bind statements to a session, so SET and temp tables survive between.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".