Skip to main content

IdGenerator

Trait IdGenerator 

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

Generator for unique identifiers used by the framework (session_id, run_id, subagent task_id, …).

The contract is intentionally loose: implementations may produce random, monotonic, or deterministic-by-seed IDs. The framework treats output as opaque and only requires uniqueness within the hosting process.

Required Methods§

Source

fn next_id(&self) -> String

Return a fresh ID. May be called concurrently from many tasks.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§