pub struct PooledSpan {
pub trace_id: String,
pub span_id: String,
pub name: Cow<'static, str>,
pub attributes: Vec<(Cow<'static, str>, String)>,
pub timestamp_nanos: u64,
pub duration_nanos: u64,
pub status_code: i32,
}Expand description
Pooled span data (Sprint 36: zero-copy with Cow)
Fields§
§trace_id: String§span_id: String§name: Cow<'static, str>Operation name - often static (e.g., “syscall:open”, “compute_block:mean”)
Uses Cow for zero-copy when static strings are used
attributes: Vec<(Cow<'static, str>, String)>Attributes with static keys (zero-copy optimization)
timestamp_nanos: u64§duration_nanos: u64§status_code: i32Implementations§
Source§impl PooledSpan
impl PooledSpan
Sourcepub fn set_name_static(&mut self, name: &'static str)
pub fn set_name_static(&mut self, name: &'static str)
Set span name from static string (zero-copy)
Sourcepub fn set_name_owned(&mut self, name: String)
pub fn set_name_owned(&mut self, name: String)
Set span name from owned string
Sourcepub fn add_attribute_static(&mut self, key: &'static str, value: String)
pub fn add_attribute_static(&mut self, key: &'static str, value: String)
Add attribute with static key (zero-copy for key)
Sourcepub fn add_attribute_owned(&mut self, key: String, value: String)
pub fn add_attribute_owned(&mut self, key: String, value: String)
Add attribute with owned key
Trait Implementations§
Source§impl Clone for PooledSpan
impl Clone for PooledSpan
Source§fn clone(&self) -> PooledSpan
fn clone(&self) -> PooledSpan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PooledSpan
impl RefUnwindSafe for PooledSpan
impl Send for PooledSpan
impl Sync for PooledSpan
impl Unpin for PooledSpan
impl UnsafeUnpin for PooledSpan
impl UnwindSafe for PooledSpan
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