Files
IdeA/crates/infrastructure/src/id/mod.rs
Blomios 307ae71857 feat: add main features
Agents for developpement added + frontend add + backend added. Git viewer created + agent and template creator + layout and project creator
2026-06-06 01:27:01 +02:00

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()
}
}