[][src]Struct observer::span::Span

pub struct Span {
    pub id: String,
    pub items: Vec<(Duration, SpanItem)>,
    pub success: Option<bool>,
    pub result: Option<Value>,
    pub err: Option<String>,
    pub created_on: Instant,
    pub duration: Option<Duration>,
    // some fields omitted
}

Fields

id: Stringitems: Vec<(Duration, SpanItem)>success: Option<bool>result: Option<Value>err: Option<String>created_on: Instantduration: Option<Duration>

Implementations

impl Span[src]

pub fn duration(&self) -> Duration[src]

pub fn new(id: &str) -> Span[src]

pub fn end(&mut self) -> &mut Self[src]

pub fn set_result(&mut self, result: impl Serialize) -> &mut Self[src]

pub fn set_success(&mut self, is_success: bool) -> &mut Self[src]

pub fn set_err(&mut self, err: Option<String>) -> &mut Self[src]

pub fn add_sub_frame(&mut self, created_on: Instant, frame: Span)[src]

pub fn get_key(&self) -> String[src]

pub fn add_log(&mut self, log: &'static str)[src]

pub fn add_breadcrumbs(&mut self, name: &'static str, value: Value)[src]

Trait Implementations

impl Clone for Span[src]

impl Debug for Span[src]

impl Serialize for Span[src]

Auto Trait Implementations

impl RefUnwindSafe for Span

impl Send for Span

impl Sync for Span

impl Unpin for Span

impl UnwindSafe for Span

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoSql for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,