pub struct ContextBuilder<T, C> { /* private fields */ }
Expand description

Wrapper type for building up contexts recursively, adding one item to the context at a time.

Trait Implementations§

source§

impl<T: Clone, C: Clone> Clone for ContextBuilder<T, C>

source§

fn clone(&self) -> ContextBuilder<T, C>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug, C: Debug> Debug for ContextBuilder<T, C>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Default, C: Default> Default for ContextBuilder<T, C>

source§

fn default() -> ContextBuilder<T, C>

Returns the “default value” for a type. Read more
source§

impl<C> Has<Option<AuthData>> for ContextBuilder<Option<AuthData>, C>

source§

fn set(&mut self, item: Option<AuthData>)

Set the value.
source§

fn get(&self) -> &Option<AuthData>

Get an immutable reference to the value.
source§

fn get_mut(&mut self) -> &mut Option<AuthData>

Get a mutable reference to the value.
source§

impl<C: Has<Option<AuthData>>> Has<Option<AuthData>> for ContextBuilder<Option<Authorization>, C>

source§

fn set(&mut self, item: Option<AuthData>)

Set the value.
source§

fn get(&self) -> &Option<AuthData>

Get an immutable reference to the value.
source§

fn get_mut(&mut self) -> &mut Option<AuthData>

Get a mutable reference to the value.
source§

impl<C: Has<Option<AuthData>>> Has<Option<AuthData>> for ContextBuilder<XSpanIdString, C>

source§

fn set(&mut self, item: Option<AuthData>)

Set the value.
source§

fn get(&self) -> &Option<AuthData>

Get an immutable reference to the value.
source§

fn get_mut(&mut self) -> &mut Option<AuthData>

Get a mutable reference to the value.
source§

impl<C: Has<Option<Authorization>>> Has<Option<Authorization>> for ContextBuilder<Option<AuthData>, C>

source§

fn set(&mut self, item: Option<Authorization>)

Set the value.
source§

fn get(&self) -> &Option<Authorization>

Get an immutable reference to the value.
source§

fn get_mut(&mut self) -> &mut Option<Authorization>

Get a mutable reference to the value.
source§

impl<C> Has<Option<Authorization>> for ContextBuilder<Option<Authorization>, C>

source§

fn set(&mut self, item: Option<Authorization>)

Set the value.
source§

fn get(&self) -> &Option<Authorization>

Get an immutable reference to the value.
source§

fn get_mut(&mut self) -> &mut Option<Authorization>

Get a mutable reference to the value.
source§

impl<C: Has<Option<Authorization>>> Has<Option<Authorization>> for ContextBuilder<XSpanIdString, C>

source§

fn set(&mut self, item: Option<Authorization>)

Set the value.
source§

fn get(&self) -> &Option<Authorization>

Get an immutable reference to the value.
source§

fn get_mut(&mut self) -> &mut Option<Authorization>

Get a mutable reference to the value.
source§

impl<C: Has<XSpanIdString>> Has<XSpanIdString> for ContextBuilder<Option<AuthData>, C>

source§

fn set(&mut self, item: XSpanIdString)

Set the value.
source§

fn get(&self) -> &XSpanIdString

Get an immutable reference to the value.
source§

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>

source§

fn set(&mut self, item: XSpanIdString)

Set the value.
source§

fn get(&self) -> &XSpanIdString

Get an immutable reference to the value.
source§

fn get_mut(&mut self) -> &mut XSpanIdString

Get a mutable reference to the value.
source§

impl<C> Has<XSpanIdString> for ContextBuilder<XSpanIdString, C>

source§

fn set(&mut self, item: XSpanIdString)

Set the value.
source§

fn get(&self) -> &XSpanIdString

Get an immutable reference to the value.
source§

fn get_mut(&mut self) -> &mut XSpanIdString

Get a mutable reference to the value.
source§

impl<T: PartialEq, C: PartialEq> PartialEq<ContextBuilder<T, C>> for ContextBuilder<T, C>

source§

fn eq(&self, other: &ContextBuilder<T, C>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<C> Pop<Option<AuthData>> for ContextBuilder<Option<AuthData>, C>

§

type Result = C

The type that remains after the value has been popped.
source§

fn pop(self) -> (Option<AuthData>, Self::Result)

Extracts a value.
source§

impl<C> Pop<Option<AuthData>> for ContextBuilder<Option<Authorization>, C>where C: Pop<Option<AuthData>>,

§

type Result = ContextBuilder<Option<Authorization>, <C as Pop<Option<AuthData>>>::Result>

The type that remains after the value has been popped.
source§

fn pop(self) -> (Option<AuthData>, Self::Result)

Extracts a value.
source§

impl<C> Pop<Option<AuthData>> for ContextBuilder<XSpanIdString, C>where C: Pop<Option<AuthData>>,

§

type Result = ContextBuilder<XSpanIdString, <C as Pop<Option<AuthData>>>::Result>

The type that remains after the value has been popped.
source§

fn pop(self) -> (Option<AuthData>, Self::Result)

Extracts a value.
source§

impl<C> Pop<Option<Authorization>> for ContextBuilder<Option<AuthData>, C>where C: Pop<Option<Authorization>>,

§

type Result = ContextBuilder<Option<AuthData>, <C as Pop<Option<Authorization>>>::Result>

The type that remains after the value has been popped.
source§

fn pop(self) -> (Option<Authorization>, Self::Result)

Extracts a value.
source§

impl<C> Pop<Option<Authorization>> for ContextBuilder<Option<Authorization>, C>

§

type Result = C

The type that remains after the value has been popped.
source§

fn pop(self) -> (Option<Authorization>, Self::Result)

Extracts a value.
source§

impl<C> Pop<Option<Authorization>> for ContextBuilder<XSpanIdString, C>where C: Pop<Option<Authorization>>,

§

type Result = ContextBuilder<XSpanIdString, <C as Pop<Option<Authorization>>>::Result>

The type that remains after the value has been popped.
source§

fn pop(self) -> (Option<Authorization>, Self::Result)

Extracts a value.
source§

impl<C> Pop<XSpanIdString> for ContextBuilder<Option<AuthData>, C>where C: Pop<XSpanIdString>,

§

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)

Extracts a value.
source§

impl<C> Pop<XSpanIdString> for ContextBuilder<Option<Authorization>, C>where C: Pop<XSpanIdString>,

§

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)

Extracts a value.
source§

impl<C> Pop<XSpanIdString> for ContextBuilder<XSpanIdString, C>

§

type Result = C

The type that remains after the value has been popped.
source§

fn pop(self) -> (XSpanIdString, Self::Result)

Extracts a value.
source§

impl<C, T> Push<Option<AuthData>> for ContextBuilder<T, C>

§

type Result = ContextBuilder<Option<AuthData>, ContextBuilder<T, C>>

The type that results from adding an item.
source§

fn push(self, item: Option<AuthData>) -> Self::Result

Inserts a value.
source§

impl<C, T> Push<Option<Authorization>> for ContextBuilder<T, C>

§

type Result = ContextBuilder<Option<Authorization>, ContextBuilder<T, C>>

The type that results from adding an item.
source§

fn push(self, item: Option<Authorization>) -> Self::Result

Inserts a value.
source§

impl<C, T> Push<XSpanIdString> for 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

Inserts a value.
source§

impl<T: Eq, C: Eq> Eq for ContextBuilder<T, C>

source§

impl<T, C> StructuralEq for ContextBuilder<T, C>

source§

impl<T, C> StructuralPartialEq for ContextBuilder<T, C>

Auto Trait Implementations§

§

impl<T, C> RefUnwindSafe for ContextBuilder<T, C>where C: RefUnwindSafe, T: RefUnwindSafe,

§

impl<T, C> Send for ContextBuilder<T, C>where C: Send, T: Send,

§

impl<T, C> Sync for ContextBuilder<T, C>where C: Sync, T: Sync,

§

impl<T, C> Unpin for ContextBuilder<T, C>where C: Unpin, T: Unpin,

§

impl<T, C> UnwindSafe for ContextBuilder<T, C>where C: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

§

type Remainder = Choices

source§

fn subset( self ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U, I> LiftInto<U, I> for Twhere U: LiftFrom<T, I>,

source§

fn lift_into(self) -> U

Performs the indexed conversion.
source§

impl<B> NotFound<B> for Bwhere B: Default,

source§

fn not_found() -> Response<B>

Available on crate feature server and (crate features http1 or http2) only.
Return a “not found” response
source§

impl<Source> Sculptor<HNil, HNil> for Source

§

type Remainder = Source

source§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Typeable for Twhere T: Any,

§

fn get_type(&self) -> TypeId

Get the TypeId of this object.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> RcBound for Twhere T: Push<Option<Authorization>> + Send + 'static,