stratus::infra::tracing

Trait SpanExt

Source
pub trait SpanExt {
    // Required methods
    fn rec_str<T>(&self, field: &'static str, value: &T)
       where T: ToString;
    fn rec_opt<T>(&self, field: &'static str, value: &Option<T>)
       where T: ToString;

    // Provided method
    fn with<F>(fill: F)
       where F: Fn(Span) { ... }
}
Expand description

Extensions for tracing::Span.

Required Methods§

Source

fn rec_str<T>(&self, field: &'static str, value: &T)
where T: ToString,

Records a value using ToString implementation.

Source

fn rec_opt<T>(&self, field: &'static str, value: &Option<T>)
where T: ToString,

Records a value using ToString implementation if the option value is present.

Provided Methods§

Source

fn with<F>(fill: F)
where F: Fn(Span),

Applies the provided function to the current span.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl SpanExt for Span

Source§

fn rec_str<T>(&self, field: &'static str, value: &T)
where T: ToString,

Source§

fn rec_opt<T>(&self, field: &'static str, value: &Option<T>)
where T: ToString,

Implementors§