Trait ConnID
pub trait ConnID:
Send
+ Sync
+ Eq
+ Hash
+ Clone
+ Debug
+ 'static {
// Provided methods
fn is_reusable(&self) -> bool { ... }
fn attributes(&self) -> impl Iterator<Item = KeyValue> { ... }
}Available on crate feature
net only.Expand description
ConnID is used to identify a connection in a connection pool. These IDs
are not unique and multiple connections can have the same ID. IDs are used
to filter which connections can be used for a specific input in a way that
is independent of what an input is.
Provided Methods§
fn is_reusable(&self) -> bool
fn is_reusable(&self) -> bool
Whether a connection with this policy may be shared with later requests.
A false result requires a fresh connection that is discarded after use. Pool capacity limits still apply.
fn attributes(&self) -> impl Iterator<Item = KeyValue>
Available on crate feature opentelemetry only.
fn attributes(&self) -> impl Iterator<Item = KeyValue>
opentelemetry only.Returns a list of attributes to add to metrics generated by the connection pool.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".