Trait ConnID
pub trait ConnID:
Send
+ Sync
+ PartialEq
+ Clone
+ Debug
+ 'static {
// Provided method
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 Request in a way that
is independent of what a Request is.
Provided Methods§
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", so this trait is not object safe.
Implementations on Foreign Types§
§impl ConnID for (Protocol, HostWithOptPort)
impl ConnID for (Protocol, HostWithOptPort)
§fn attributes(&self) -> impl Iterator<Item = KeyValue>
fn attributes(&self) -> impl Iterator<Item = KeyValue>
Available on crate feature
opentelemetry only.