Skip to main content

IdGenerator

Trait IdGenerator 

Source
pub trait IdGenerator: Send + Sync {
    // Required method
    fn generate(&self) -> String;
}
Expand description

Produces identifiers.

Implement this to make ids deterministic in tests.

Required Methods§

Source

fn generate(&self) -> String

Returns a new identifier.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§