Struct swagger::XSpanIdString
source · 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 copy 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>,
§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>,
§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>
§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
§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 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