Skip to main content

Args

Struct Args 

Source
pub struct Args<T>(pub T);
Expand description

Wrapper around tuple to satisfy orphan rule.

This wrapper enables implementing hitbox traits for tuples of function arguments. Without this wrapper, we couldn’t implement foreign traits (CacheableRequest, etc.) for foreign types (tuples).

Tuple Fields§

§0: T

Implementations§

Source§

impl<T> Args<T>

Source

pub fn new(inner: T) -> Self

Create a new Args wrapper.

Source

pub fn into_inner(self) -> T

Unwrap and return the inner value.

Trait Implementations§

Source§

impl CacheableRequest for Args<()>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T0: Send + Sync + 'static> CacheableRequest for Args<(T0,)>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T0: Send + Sync + 'static, T1: Send + Sync + 'static> CacheableRequest for Args<(T0, T1)>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T0: Send + Sync + 'static, T1: Send + Sync + 'static, T2: Send + Sync + 'static> CacheableRequest for Args<(T0, T1, T2)>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T0: Send + Sync + 'static, T1: Send + Sync + 'static, T2: Send + Sync + 'static, T3: Send + Sync + 'static> CacheableRequest for Args<(T0, T1, T2, T3)>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T0: Send + Sync + 'static, T1: Send + Sync + 'static, T2: Send + Sync + 'static, T3: Send + Sync + 'static, T4: Send + Sync + 'static> CacheableRequest for Args<(T0, T1, T2, T3, T4)>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T0: Send + Sync + 'static, T1: Send + Sync + 'static, T2: Send + Sync + 'static, T3: Send + Sync + 'static, T4: Send + Sync + 'static, T5: Send + Sync + 'static> CacheableRequest for Args<(T0, T1, T2, T3, T4, T5)>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T0: Send + Sync + 'static, T1: Send + Sync + 'static, T2: Send + Sync + 'static, T3: Send + Sync + 'static, T4: Send + Sync + 'static, T5: Send + Sync + 'static, T6: Send + Sync + 'static> CacheableRequest for Args<(T0, T1, T2, T3, T4, T5, T6)>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T0: Send + Sync + 'static, T1: Send + Sync + 'static, T2: Send + Sync + 'static, T3: Send + Sync + 'static, T4: Send + Sync + 'static, T5: Send + Sync + 'static, T6: Send + Sync + 'static, T7: Send + Sync + 'static> CacheableRequest for Args<(T0, T1, T2, T3, T4, T5, T6, T7)>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T0: Send + Sync + 'static, T1: Send + Sync + 'static, T2: Send + Sync + 'static, T3: Send + Sync + 'static, T4: Send + Sync + 'static, T5: Send + Sync + 'static, T6: Send + Sync + 'static, T7: Send + Sync + 'static, T8: Send + Sync + 'static> CacheableRequest for Args<(T0, T1, T2, T3, T4, T5, T6, T7, T8)>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T0: Send + Sync + 'static, T1: Send + Sync + 'static, T2: Send + Sync + 'static, T3: Send + Sync + 'static, T4: Send + Sync + 'static, T5: Send + Sync + 'static, T6: Send + Sync + 'static, T7: Send + Sync + 'static, T8: Send + Sync + 'static, T9: Send + Sync + 'static> CacheableRequest for Args<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T0: Send + Sync + 'static, T1: Send + Sync + 'static, T2: Send + Sync + 'static, T3: Send + Sync + 'static, T4: Send + Sync + 'static, T5: Send + Sync + 'static, T6: Send + Sync + 'static, T7: Send + Sync + 'static, T8: Send + Sync + 'static, T9: Send + Sync + 'static, T10: Send + Sync + 'static> CacheableRequest for Args<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T0: Send + Sync + 'static, T1: Send + Sync + 'static, T2: Send + Sync + 'static, T3: Send + Sync + 'static, T4: Send + Sync + 'static, T5: Send + Sync + 'static, T6: Send + Sync + 'static, T7: Send + Sync + 'static, T8: Send + Sync + 'static, T9: Send + Sync + 'static, T10: Send + Sync + 'static, T11: Send + Sync + 'static> CacheableRequest for Args<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>

Source§

async fn cache_policy<P, E>( self, predicates: P, extractors: E, ) -> RequestCachePolicy<Self>
where P: Predicate<Subject = Self> + Send + Sync, E: Extractor<Subject = Self> + Send + Sync,

Determine if this request should be cached and extract its key. Read more
Source§

impl<T: Clone> Clone for Args<T>

Source§

fn clone(&self) -> Args<T>

Returns a duplicate 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> Debug for Args<T>

Source§

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

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

impl KeyExtract for Args<()>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.
Source§

impl<T0: KeyExtract> KeyExtract for Args<(T0,)>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.
Source§

impl<T0: KeyExtract, T1: KeyExtract> KeyExtract for Args<(T0, T1)>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.
Source§

impl<T0: KeyExtract, T1: KeyExtract, T2: KeyExtract> KeyExtract for Args<(T0, T1, T2)>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.
Source§

impl<T0: KeyExtract, T1: KeyExtract, T2: KeyExtract, T3: KeyExtract> KeyExtract for Args<(T0, T1, T2, T3)>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.
Source§

impl<T0: KeyExtract, T1: KeyExtract, T2: KeyExtract, T3: KeyExtract, T4: KeyExtract> KeyExtract for Args<(T0, T1, T2, T3, T4)>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.
Source§

impl<T0: KeyExtract, T1: KeyExtract, T2: KeyExtract, T3: KeyExtract, T4: KeyExtract, T5: KeyExtract> KeyExtract for Args<(T0, T1, T2, T3, T4, T5)>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.
Source§

impl<T0: KeyExtract, T1: KeyExtract, T2: KeyExtract, T3: KeyExtract, T4: KeyExtract, T5: KeyExtract, T6: KeyExtract> KeyExtract for Args<(T0, T1, T2, T3, T4, T5, T6)>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.
Source§

impl<T0: KeyExtract, T1: KeyExtract, T2: KeyExtract, T3: KeyExtract, T4: KeyExtract, T5: KeyExtract, T6: KeyExtract, T7: KeyExtract> KeyExtract for Args<(T0, T1, T2, T3, T4, T5, T6, T7)>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.
Source§

impl<T0: KeyExtract, T1: KeyExtract, T2: KeyExtract, T3: KeyExtract, T4: KeyExtract, T5: KeyExtract, T6: KeyExtract, T7: KeyExtract, T8: KeyExtract> KeyExtract for Args<(T0, T1, T2, T3, T4, T5, T6, T7, T8)>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.
Source§

impl<T0: KeyExtract, T1: KeyExtract, T2: KeyExtract, T3: KeyExtract, T4: KeyExtract, T5: KeyExtract, T6: KeyExtract, T7: KeyExtract, T8: KeyExtract, T9: KeyExtract> KeyExtract for Args<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.
Source§

impl<T0: KeyExtract, T1: KeyExtract, T2: KeyExtract, T3: KeyExtract, T4: KeyExtract, T5: KeyExtract, T6: KeyExtract, T7: KeyExtract, T8: KeyExtract, T9: KeyExtract, T10: KeyExtract> KeyExtract for Args<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.
Source§

impl<T0: KeyExtract, T1: KeyExtract, T2: KeyExtract, T3: KeyExtract, T4: KeyExtract, T5: KeyExtract, T6: KeyExtract, T7: KeyExtract, T8: KeyExtract, T9: KeyExtract, T10: KeyExtract, T11: KeyExtract> KeyExtract for Args<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>

Source§

fn extract(&self) -> Vec<KeyPart>

Extract key parts from this value.

Auto Trait Implementations§

§

impl<T> Freeze for Args<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Args<T>
where T: RefUnwindSafe,

§

impl<T> Send for Args<T>
where T: Send,

§

impl<T> Sync for Args<T>
where T: Sync,

§

impl<T> Unpin for Args<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Args<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for Args<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CachedFieldClone for T
where T: Clone,

Source§

fn cached_clone(&self) -> T

Clone this field for cache storage.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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 T
where 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> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
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