pub struct XSpanIdString(pub String);
Expand description
Wrapper for a string being used as an X-Span-ID.
Tuple Fields§
§0: String
Implementations§
Source§impl XSpanIdString
impl XSpanIdString
Sourcepub fn get_or_generate<T>(req: &Request<T>) -> Self
pub fn get_or_generate<T>(req: &Request<T>) -> Self
Extract an X-Span-ID from a request header if present, and if not generate a new one.
Trait Implementations§
Source§impl Clone for XSpanIdString
impl Clone for XSpanIdString
Source§fn clone(&self) -> XSpanIdString
fn clone(&self) -> XSpanIdString
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 XSpanIdString
impl Debug for XSpanIdString
Source§impl Default for XSpanIdString
impl Default for XSpanIdString
Source§impl Display for XSpanIdString
impl Display for XSpanIdString
Source§impl<C: Has<XSpanIdString>> Has<XSpanIdString> for ContextBuilder<Option<AuthData>, C>
impl<C: Has<XSpanIdString>> Has<XSpanIdString> for ContextBuilder<Option<AuthData>, C>
Source§fn set(&mut self, item: XSpanIdString)
fn set(&mut self, item: XSpanIdString)
Set the value.
Source§fn get(&self) -> &XSpanIdString
fn get(&self) -> &XSpanIdString
Get an immutable reference to the value.
Source§fn get_mut(&mut self) -> &mut XSpanIdString
fn get_mut(&mut self) -> &mut XSpanIdString
Get a mutable reference to the value.
Source§impl<C: Has<XSpanIdString>> Has<XSpanIdString> for ContextBuilder<Option<Authorization>, C>
impl<C: Has<XSpanIdString>> Has<XSpanIdString> for ContextBuilder<Option<Authorization>, C>
Source§fn set(&mut self, item: XSpanIdString)
fn set(&mut self, item: XSpanIdString)
Set the value.
Source§fn get(&self) -> &XSpanIdString
fn get(&self) -> &XSpanIdString
Get an immutable reference to the value.
Source§fn get_mut(&mut self) -> &mut XSpanIdString
fn get_mut(&mut self) -> &mut XSpanIdString
Get a mutable reference to the value.
Source§impl<C> Has<XSpanIdString> for ContextBuilder<XSpanIdString, C>
impl<C> Has<XSpanIdString> for ContextBuilder<XSpanIdString, C>
Source§fn set(&mut self, item: XSpanIdString)
fn set(&mut self, item: XSpanIdString)
Set the value.
Source§fn get(&self) -> &XSpanIdString
fn get(&self) -> &XSpanIdString
Get an immutable reference to the value.
Source§fn get_mut(&mut self) -> &mut XSpanIdString
fn get_mut(&mut self) -> &mut XSpanIdString
Get a mutable reference to the value.
Source§impl<C> Pop<XSpanIdString> for ContextBuilder<Option<AuthData>, C>where
C: Pop<XSpanIdString>,
impl<C> Pop<XSpanIdString> for ContextBuilder<Option<AuthData>, C>where
C: Pop<XSpanIdString>,
Source§type Result = ContextBuilder<Option<AuthData>, <C as Pop<XSpanIdString>>::Result>
type Result = ContextBuilder<Option<AuthData>, <C as Pop<XSpanIdString>>::Result>
The type that remains after the value has been popped.
Source§fn pop(self) -> (XSpanIdString, Self::Result)
fn pop(self) -> (XSpanIdString, Self::Result)
Extracts a value.
Source§impl<C> Pop<XSpanIdString> for ContextBuilder<Option<Authorization>, C>where
C: Pop<XSpanIdString>,
impl<C> Pop<XSpanIdString> for ContextBuilder<Option<Authorization>, C>where
C: Pop<XSpanIdString>,
Source§type Result = ContextBuilder<Option<Authorization>, <C as Pop<XSpanIdString>>::Result>
type Result = ContextBuilder<Option<Authorization>, <C as Pop<XSpanIdString>>::Result>
The type that remains after the value has been popped.
Source§fn pop(self) -> (XSpanIdString, Self::Result)
fn pop(self) -> (XSpanIdString, Self::Result)
Extracts a value.
Source§impl<C> Pop<XSpanIdString> for ContextBuilder<XSpanIdString, C>
impl<C> Pop<XSpanIdString> for ContextBuilder<XSpanIdString, C>
Source§impl<C, T> Push<XSpanIdString> for ContextBuilder<T, C>
impl<C, T> Push<XSpanIdString> for ContextBuilder<T, C>
Source§type Result = ContextBuilder<XSpanIdString, ContextBuilder<T, C>>
type Result = ContextBuilder<XSpanIdString, ContextBuilder<T, C>>
The type that results from adding an item.
Source§fn push(self, item: XSpanIdString) -> Self::Result
fn push(self, item: XSpanIdString) -> Self::Result
Inserts a value.
Source§impl Push<XSpanIdString> for EmptyContext
impl Push<XSpanIdString> for EmptyContext
Source§type Result = ContextBuilder<XSpanIdString, EmptyContext>
type Result = ContextBuilder<XSpanIdString, EmptyContext>
The type that results from adding an item.
Source§fn push(self, item: XSpanIdString) -> Self::Result
fn push(self, item: XSpanIdString) -> Self::Result
Inserts a value.
Auto Trait Implementations§
impl Freeze for XSpanIdString
impl RefUnwindSafe for XSpanIdString
impl Send for XSpanIdString
impl Sync for XSpanIdString
impl Unpin for XSpanIdString
impl UnwindSafe for XSpanIdString
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more