pub trait IdGenerator<T>: Send + Sync{
// Required method
fn generate(&self) -> T;
}Expand description
Trait for generating unique identifiers.
This trait is generic over the target ID type, allowing it to be used for
generating different kinds of identifiers such as SessionId or
transport-scoped StreamId.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".