Agents for developpement added + frontend add + backend added. Git viewer created + agent and template creator + layout and project creator
23 lines
481 B
Rust
23 lines
481 B
Rust
//! [`UuidGenerator`] — production [`IdGenerator`] producing random v4 UUIDs.
|
|
|
|
use domain::ports::IdGenerator;
|
|
use uuid::Uuid;
|
|
|
|
/// Real id generator producing random (v4) UUIDs.
|
|
#[derive(Debug, Default, Clone, Copy)]
|
|
pub struct UuidGenerator;
|
|
|
|
impl UuidGenerator {
|
|
/// Creates a new [`UuidGenerator`].
|
|
#[must_use]
|
|
pub const fn new() -> Self {
|
|
Self
|
|
}
|
|
}
|
|
|
|
impl IdGenerator for UuidGenerator {
|
|
fn new_uuid(&self) -> Uuid {
|
|
Uuid::new_v4()
|
|
}
|
|
}
|