Skip to main content

UniqueID

Trait UniqueID 

Source
pub trait UniqueID {
    // Required method
    fn id(&self) -> UniqueIDType;
}
Expand description

Define how a given session/connection identifies itself.

Required Methods§

Source

fn id(&self) -> UniqueIDType

The ID returned should be unique among all existing connections of the same type. But ID can be recycled after a connection is shutdown.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl UniqueID for DuplexStream

Source§

impl UniqueID for Mock

Source§

impl UniqueID for UnixStream

Available on Unix only.
Source§

impl<T> UniqueID for Cursor<T>

Implementors§

Source§

impl UniqueID for HttpSession

Source§

impl UniqueID for Stream

Available on Unix only.
Source§

impl<S> UniqueID for SslStream<S>

Available on non-crate feature any_tls only.