pub struct Span {
pub context: SpanContext,
pub name: String,
pub kind: SpanKind,
pub start_ms: u64,
pub end_ms: Option<u64>,
pub status: SpanStatus,
pub attributes: HashMap<String, Value>,
pub events: Vec<SpanEvent>,
pub links: Vec<SpanContext>,
}Fields§
§context: SpanContext§name: String§kind: SpanKind§start_ms: u64§end_ms: Option<u64>§status: SpanStatus§attributes: HashMap<String, Value>§events: Vec<SpanEvent>§links: Vec<SpanContext>Implementations§
Source§impl Span
impl Span
Sourcepub fn duration_ms(&self) -> Option<u64>
pub fn duration_ms(&self) -> Option<u64>
Duration in milliseconds.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
True if the span has an end time.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Span
impl<'de> Deserialize<'de> for Span
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Span, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Span, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Span
impl Serialize for Span
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnsafeUnpin for Span
impl UnwindSafe for Span
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