pub enum TracerPayloadCollection {
V07(Vec<TracerPayload>),
V04(Vec<Vec<SpanBytes>>),
V05((SharedDictBytes, Vec<Vec<Span>>)),
}Expand description
Enum representing a general abstraction for a collection of tracer payloads.
Variants§
V07(Vec<TracerPayload>)
Collection of TracerPayloads.
V04(Vec<Vec<SpanBytes>>)
Collection of TraceChunkSpan.
V05((SharedDictBytes, Vec<Vec<Span>>))
Collection of TraceChunkSpan with de-duplicated strings.
Implementations§
Source§impl TracerPayloadCollection
impl TracerPayloadCollection
Sourcepub fn append(&mut self, other: &mut Self)
pub fn append(&mut self, other: &mut Self)
Appends other collection of the same type to the current collection.
#Arguments
other: collection of the same type.
§Examples:
use libdd_trace_protobuf::pb::TracerPayload;
use libdd_trace_utils::tracer_payload::TracerPayloadCollection;
let mut col1 = TracerPayloadCollection::V07(vec![TracerPayload::default()]);
let mut col2 = TracerPayloadCollection::V07(vec![TracerPayload::default()]);
col1.append(&mut col2);Sourcepub fn merge(&mut self)
pub fn merge(&mut self)
Merges traces that came from the same origin together to reduce the payload size.
§Examples:
use libdd_trace_protobuf::pb::TracerPayload;
use libdd_trace_utils::tracer_payload::TracerPayloadCollection;
let mut col1 =
TracerPayloadCollection::V07(vec![TracerPayload::default(), TracerPayload::default()]);
col1.merge();Sourcepub fn size(&self) -> usize
pub fn size(&self) -> usize
Computes the size of the collection.
§Returns
The number of traces contained in the collection.
§Examples:
use libdd_trace_protobuf::pb::TracerPayload;
use libdd_trace_utils::tracer_payload::TracerPayloadCollection;
let col1 = TracerPayloadCollection::V07(vec![TracerPayload::default()]);
col1.size();Trait Implementations§
Source§impl Clone for TracerPayloadCollection
impl Clone for TracerPayloadCollection
Source§fn clone(&self) -> TracerPayloadCollection
fn clone(&self) -> TracerPayloadCollection
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 TracerPayloadCollection
impl RefUnwindSafe for TracerPayloadCollection
impl Send for TracerPayloadCollection
impl Sync for TracerPayloadCollection
impl Unpin for TracerPayloadCollection
impl UnwindSafe for TracerPayloadCollection
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