pub struct Annotation { /* private fields */ }
Expand description
Associates an event that explains latency with a timestamp.
Unlike log statements, annotations are often codes, e.g. “ws” for WireSend.
Zipkin v1 core annotations such as “cs” and “sr” have been replaced with
Span::kind
, which interprets timestamp and duration.
Implementations§
Source§impl Annotation
impl Annotation
Sourcepub fn new(timestamp: SystemTime, value: &str) -> Annotation
pub fn new(timestamp: SystemTime, value: &str) -> Annotation
Creates a new Annotation
.
Sourcepub fn now(value: &str) -> Annotation
pub fn now(value: &str) -> Annotation
Creates a new Annotation
at the current time.
Sourcepub fn timestamp(&self) -> SystemTime
pub fn timestamp(&self) -> SystemTime
Returns the time at which the annotated event occurred.
Trait Implementations§
Source§impl Clone for Annotation
impl Clone for Annotation
Source§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
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 moreAuto Trait Implementations§
impl Freeze for Annotation
impl RefUnwindSafe for Annotation
impl Send for Annotation
impl Sync for Annotation
impl Unpin for Annotation
impl UnwindSafe for Annotation
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