pub struct SpanId(/* private fields */);Expand description
W3C Trace Context span ID (64-bit / 8 bytes).
Identifies a specific span within a trace. Formatted as 16 lowercase hex characters per the W3C specification.
§Invariants
- An all-zero span ID is considered invalid (per W3C spec).
§Examples
use torvyn_types::SpanId;
let id = SpanId::new([0x00, 0xf0, 0x67, 0xaa, 0x0b, 0xa9, 0x02, 0xb7]);
assert!(id.is_valid());
assert_eq!(id.to_string().len(), 16);Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SpanId
impl<'de> Deserialize<'de> for SpanId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for SpanId
impl Eq for SpanId
impl StructuralPartialEq for SpanId
Auto Trait Implementations§
impl Freeze for SpanId
impl RefUnwindSafe for SpanId
impl Send for SpanId
impl Sync for SpanId
impl Unpin for SpanId
impl UnwindSafe for SpanId
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