Trait ConnID

pub trait ConnID:
    Send
    + Sync
    + PartialEq
    + Clone
    + Debug
    + 'static {
    // Provided method
    fn attributes(&self) -> impl Iterator<Item = KeyValue> { ... }
}
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>

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, Authority)

§

fn attributes(&self) -> impl Iterator<Item = KeyValue>

Implementors§