pub struct SpanAnnotations { /* private fields */ }Expand description
A collection of annotated spans.
Implementations§
Source§impl SpanAnnotations
impl SpanAnnotations
pub fn new() -> Self
pub fn add(&mut self, a: AnnotatedSpan)
pub fn annotate(&mut self, span: Span, text: impl Into<String>)
pub fn at_offset(&self, offset: usize) -> Vec<&AnnotatedSpan>
pub fn with_tag<'a>(&'a self, tag: &str) -> Vec<&'a AnnotatedSpan>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn sort_by_start(&mut self)
pub fn iter(&self) -> impl Iterator<Item = &AnnotatedSpan>
pub fn clear(&mut self)
pub fn merge(&mut self, other: SpanAnnotations)
Trait Implementations§
Source§impl Clone for SpanAnnotations
impl Clone for SpanAnnotations
Source§fn clone(&self) -> SpanAnnotations
fn clone(&self) -> SpanAnnotations
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 SpanAnnotations
impl Debug for SpanAnnotations
Source§impl Default for SpanAnnotations
impl Default for SpanAnnotations
Source§fn default() -> SpanAnnotations
fn default() -> SpanAnnotations
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SpanAnnotations
impl RefUnwindSafe for SpanAnnotations
impl Send for SpanAnnotations
impl Sync for SpanAnnotations
impl Unpin for SpanAnnotations
impl UnsafeUnpin for SpanAnnotations
impl UnwindSafe for SpanAnnotations
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