pub struct IdGenerator { /* private fields */ }Available on crate feature
trace only.Expand description
Default crate::trace::IdGenerator implementation.
Generates Trace and Span ids using a random number generator.
Trait Implementations§
Source§impl Clone for IdGenerator
impl Clone for IdGenerator
Source§fn clone(&self) -> IdGenerator
fn clone(&self) -> IdGenerator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IdGenerator
impl Debug for IdGenerator
Source§impl Default for IdGenerator
impl Default for IdGenerator
Source§fn default() -> IdGenerator
fn default() -> IdGenerator
Returns the “default value” for a type. Read more
Source§impl IdGenerator for IdGenerator
impl IdGenerator for IdGenerator
Source§fn new_trace_id(&self) -> TraceId
fn new_trace_id(&self) -> TraceId
Generate new TraceId using thread local rng
Source§fn new_span_id(&self) -> SpanId
fn new_span_id(&self) -> SpanId
Generate new SpanId using thread local rng
Auto Trait Implementations§
impl Freeze for IdGenerator
impl RefUnwindSafe for IdGenerator
impl Send for IdGenerator
impl Sync for IdGenerator
impl Unpin for IdGenerator
impl UnwindSafe for IdGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Available on crate feature
trace only.Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Available on crate feature
trace only.