Skip to main content

IdGenerator

Trait IdGenerator 

pub trait IdGenerator:
    Send
    + Sync
    + Debug {
    // Required methods
    fn new_trace_id(&self) -> TraceId;
    fn new_span_id(&self) -> SpanId;
}
Available on crate features opentelemetry and trace only.
Expand description

Interface for generating IDs

Required Methods§

fn new_trace_id(&self) -> TraceId

Generate a new TraceId

fn new_span_id(&self) -> SpanId

Generate a new SpanId

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§