pub struct TaskTreeId<S: UrnScheme> { /* private fields */ }Expand description
W3C trace-sized identity for one distributed task tree, minted
under the application’s UrnScheme.
Implementations§
Source§impl<S: UrnScheme> TaskTreeId<S>
impl<S: UrnScheme> TaskTreeId<S>
Sourcepub fn new(raw: &str) -> Result<Self, TaskIdentityError>
pub fn new(raw: &str) -> Result<Self, TaskIdentityError>
Parse a task-tree URN, bare W3C trace ID, or W3C traceparent.
§Errors
Returns an error when the trace identity is malformed or all zero.
Sourcepub fn as_w3c_trace_id(&self) -> &str
pub fn as_w3c_trace_id(&self) -> &str
Return the W3C trace ID without its URN prefix.
Trait Implementations§
Source§impl<S: Clone + UrnScheme> Clone for TaskTreeId<S>
impl<S: Clone + UrnScheme> Clone for TaskTreeId<S>
Source§fn clone(&self) -> TaskTreeId<S>
fn clone(&self) -> TaskTreeId<S>
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 moreSource§impl<'de, S: UrnScheme> Deserialize<'de> for TaskTreeId<S>
impl<'de, S: UrnScheme> Deserialize<'de> for TaskTreeId<S>
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
Source§impl<S: UrnScheme> Display for TaskTreeId<S>
impl<S: UrnScheme> Display for TaskTreeId<S>
impl<S: Eq + UrnScheme> Eq for TaskTreeId<S>
Source§impl<S: UrnScheme> FromStr for TaskTreeId<S>
impl<S: UrnScheme> FromStr for TaskTreeId<S>
Source§impl<S: Ord + UrnScheme> Ord for TaskTreeId<S>
impl<S: Ord + UrnScheme> Ord for TaskTreeId<S>
Source§fn cmp(&self, other: &TaskTreeId<S>) -> Ordering
fn cmp(&self, other: &TaskTreeId<S>) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<S: PartialOrd + UrnScheme> PartialOrd for TaskTreeId<S>
impl<S: PartialOrd + UrnScheme> PartialOrd for TaskTreeId<S>
Source§impl<S: UrnScheme> Serialize for TaskTreeId<S>
impl<S: UrnScheme> Serialize for TaskTreeId<S>
impl<S: PartialEq + UrnScheme> StructuralPartialEq for TaskTreeId<S>
Auto Trait Implementations§
impl<S> Freeze for TaskTreeId<S>where
PhantomData<S>: Freeze,
impl<S> RefUnwindSafe for TaskTreeId<S>where
PhantomData<S>: RefUnwindSafe,
impl<S> Send for TaskTreeId<S>where
PhantomData<S>: Send,
impl<S> Sync for TaskTreeId<S>where
PhantomData<S>: Sync,
impl<S> Unpin for TaskTreeId<S>where
PhantomData<S>: Unpin,
impl<S> UnsafeUnpin for TaskTreeId<S>where
PhantomData<S>: UnsafeUnpin,
impl<S> UnwindSafe for TaskTreeId<S>where
PhantomData<S>: UnwindSafe,
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