Enum rama::combinators::Either8

pub enum Either8<A, B, C, D, E, F, G, H> {
    A(A),
    B(B),
    C(C),
    D(D),
    E(E),
    F(F),
    G(G),
    H(H),
}
Expand description

A type to allow you to use multiple types as a single type.

and will delegate the functionality to the type that is wrapped in the Either type. To keep it easy all wrapped types are expected to work with the same inputs and outputs.

You can use [crate::combinators::impl_either] to implement the Either type for the available number of type parameters on your own Trait implementations.

Variants§

§

A(A)

one of the Either variants

§

B(B)

one of the Either variants

§

C(C)

one of the Either variants

§

D(D)

one of the Either variants

§

E(E)

one of the Either variants

§

F(F)

one of the Either variants

§

G(G)

one of the Either variants

§

H(H)

one of the Either variants

Trait Implementations§

§

impl<A, B, C, D, E, F, G, H> AsyncRead for Either8<A, B, C, D, E, F, G, H>
where A: AsyncRead + Unpin, B: AsyncRead + Unpin, C: AsyncRead + Unpin, D: AsyncRead + Unpin, E: AsyncRead + Unpin, F: AsyncRead + Unpin, G: AsyncRead + Unpin, H: AsyncRead + Unpin,

§

fn poll_read( self: Pin<&mut Either8<A, B, C, D, E, F, G, H>>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>, ) -> Poll<Result<(), Error>>

Attempts to read from the AsyncRead into buf. Read more
§

impl<A, B, C, D, E, F, G, H> AsyncWrite for Either8<A, B, C, D, E, F, G, H>
where A: AsyncWrite + Unpin, B: AsyncWrite + Unpin, C: AsyncWrite + Unpin, D: AsyncWrite + Unpin, E: AsyncWrite + Unpin, F: AsyncWrite + Unpin, G: AsyncWrite + Unpin, H: AsyncWrite + Unpin,

§

fn poll_write( self: Pin<&mut Either8<A, B, C, D, E, F, G, H>>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the object. Read more
§

fn poll_flush( self: Pin<&mut Either8<A, B, C, D, E, F, G, H>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>

Attempts to flush the object, ensuring that any buffered data reach their destination. Read more
§

fn poll_shutdown( self: Pin<&mut Either8<A, B, C, D, E, F, G, H>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>

Initiates or attempts to shut down this writer, returning success when the I/O connection has completely shut down. Read more
§

fn poll_write_vectored( self: Pin<&mut Either8<A, B, C, D, E, F, G, H>>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize, Error>>

Like poll_write, except that it writes from a slice of buffers. Read more
§

fn is_write_vectored(&self) -> bool

Determines if this writer has an efficient poll_write_vectored implementation. Read more
§

impl<A, B, C, D, E, F, G, H> Clone for Either8<A, B, C, D, E, F, G, H>
where A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone,

§

fn clone(&self) -> Either8<A, B, C, D, E, F, G, H>

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
§

impl<A, B, C, D, E, F, G, H> Debug for Either8<A, B, C, D, E, F, G, H>
where A: Debug, B: Debug, C: Debug, D: Debug, E: Debug, F: Debug, G: Debug, H: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<A, B, C, D, E, F, G, H> Display for Either8<A, B, C, D, E, F, G, H>
where A: Display, B: Display, C: Display, D: Display, E: Display, F: Display, G: Display, H: Display,

§

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

Formats the value using the given formatter. Read more
§

impl<A, B, C, D, E, F, G, H> DnsResolver for Either8<A, B, C, D, E, F, G, H>
where A: DnsResolver, <A as DnsResolver>::Error: Into<Box<dyn Error + Send + Sync>>, B: DnsResolver, <B as DnsResolver>::Error: Into<Box<dyn Error + Send + Sync>>, C: DnsResolver, <C as DnsResolver>::Error: Into<Box<dyn Error + Send + Sync>>, D: DnsResolver, <D as DnsResolver>::Error: Into<Box<dyn Error + Send + Sync>>, E: DnsResolver, <E as DnsResolver>::Error: Into<Box<dyn Error + Send + Sync>>, F: DnsResolver, <F as DnsResolver>::Error: Into<Box<dyn Error + Send + Sync>>, G: DnsResolver, <G as DnsResolver>::Error: Into<Box<dyn Error + Send + Sync>>, H: DnsResolver, <H as DnsResolver>::Error: Into<Box<dyn Error + Send + Sync>>,

§

type Error = Box<dyn Error + Send + Sync>

Error returned by the DnsResolver
§

async fn ipv4_lookup( &self, domain: Domain, ) -> Result<Vec<Ipv4Addr>, <Either8<A, B, C, D, E, F, G, H> as DnsResolver>::Error>

Resolve the ‘A’ records accessible by this resolver for the given Domain into Ipv4Addresses.
§

async fn ipv6_lookup( &self, domain: Domain, ) -> Result<Vec<Ipv6Addr>, <Either8<A, B, C, D, E, F, G, H> as DnsResolver>::Error>

Resolve the ‘AAAA’ records accessible by this resolver for the given Domain into Ipv6Addresses.
§

impl<A, B, C, D, E, F, G, H, Item> Iterator for Either8<A, B, C, D, E, F, G, H>
where A: Iterator<Item = Item>, B: Iterator<Item = Item>, C: Iterator<Item = Item>, D: Iterator<Item = Item>, E: Iterator<Item = Item>, F: Iterator<Item = Item>, G: Iterator<Item = Item>, H: Iterator<Item = Item>,

§

type Item = Item

The type of the elements being iterated over.
§

fn next(&mut self) -> Option<Item>

Advances the iterator and returns the next value. Read more
§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn next_chunk<const N: usize>( &mut self, ) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn count(self) -> usize
where Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>
where Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where Self: Sized,

Creates an iterator starting at the same point, but stepping by the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where Self: Sized, U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where Self: Sized, U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where Self: Sized, G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)
where Self: Sized, F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where Self: Sized,

Creates an iterator which gives the current iteration count as well as the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where Self: Sized,

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where Self: Sized, P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>
where Self: Sized,

Creates an iterator that yields the first n elements, or fewer if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where Self: Sized, U: IntoIterator, F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where Self: Sized, F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over self and returns an iterator over the outputs of f. Like slice::windows(), the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where Self: Sized, F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> B
where B: FromIterator<Self::Item>, Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where E: Extend<Self::Item>, Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)
where Self: Sized, B: Default + Extend<Self::Item>, F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> bool
where Self: Sized, P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where Self: Sized, F: FnMut(B, Self::Item) -> R, R: Try<Output = B>,

An iterator method that applies a function as long as it returns successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where Self: Sized, F: FnMut(Self::Item) -> R, R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> B
where Self: Sized, F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing operation. Read more
source§

fn try_reduce<R>( &mut self, f: impl FnMut(Self::Item, Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where Self: Sized, R: Try<Output = Self::Item>, <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where Self: Sized, F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns the first non-none result. Read more
source§

fn try_find<R>( &mut self, f: impl FnMut(&Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where Self: Sized, R: Try<Output = bool>, <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where Self: Sized, P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the specified comparison function. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where FromA: Default + Extend<A>, FromB: Default + Extend<B>, Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where T: 'a + Copy, Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where T: 'a + Clone, Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where Self: Sized, S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where Self: Sized, P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Lexicographically compares the PartialOrd elements of this Iterator with those of another. The comparison works like short-circuit evaluation, returning a result without comparing the remaining elements. As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are equal to those of another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are not equal to those of another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> bool,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> K, K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction function. Read more
§

impl<A, B, C, D, E, F, G, H, S> Layer<S> for Either8<A, B, C, D, E, F, G, H>
where A: Layer<S>, B: Layer<S>, C: Layer<S>, D: Layer<S>, E: Layer<S>, F: Layer<S>, G: Layer<S>, H: Layer<S>,

§

type Service = Either8<<A as Layer<S>>::Service, <B as Layer<S>>::Service, <C as Layer<S>>::Service, <D as Layer<S>>::Service, <E as Layer<S>>::Service, <F as Layer<S>>::Service, <G as Layer<S>>::Service, <H as Layer<S>>::Service>

The service produced by the layer.
§

fn layer( &self, inner: S, ) -> <Either8<A, B, C, D, E, F, G, H> as Layer<S>>::Service

Wrap the given service with the middleware, returning a new service.
§

impl<A, B, C, D, E, F, G, H, State, Request> Matcher<State, Request> for Either8<A, B, C, D, E, F, G, H>
where A: Matcher<State, Request>, B: Matcher<State, Request>, C: Matcher<State, Request>, D: Matcher<State, Request>, E: Matcher<State, Request>, F: Matcher<State, Request>, G: Matcher<State, Request>, H: Matcher<State, Request>, Request: Send + 'static, State: Send + Sync + 'static,

§

fn matches( &self, ext: Option<&mut Extensions>, ctx: &Context<State>, req: &Request, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<State, Request>
where Self: Sized, M: Matcher<State, Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<State, Request>
where Self: Sized, M: Matcher<State, Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<State, Request>
where Self: Sized,

Negate the current condition.
§

impl<A, B, C, D, E, F, G, H, State, Request> Policy<State, Request> for Either8<A, B, C, D, E, F, G, H>
where A: Policy<State, Request>, <A as Policy<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, B: Policy<State, Request>, <B as Policy<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, C: Policy<State, Request>, <C as Policy<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, D: Policy<State, Request>, <D as Policy<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, E: Policy<State, Request>, <E as Policy<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, F: Policy<State, Request>, <F as Policy<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, G: Policy<State, Request>, <G as Policy<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, H: Policy<State, Request>, <H as Policy<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, Request: Send + 'static, State: Send + Sync + 'static,

§

type Guard = Either8<<A as Policy<State, Request>>::Guard, <B as Policy<State, Request>>::Guard, <C as Policy<State, Request>>::Guard, <D as Policy<State, Request>>::Guard, <E as Policy<State, Request>>::Guard, <F as Policy<State, Request>>::Guard, <G as Policy<State, Request>>::Guard, <H as Policy<State, Request>>::Guard>

The guard type that is returned when the request is allowed to proceed. Read more
§

type Error = Box<dyn Error + Send + Sync>

The error type that is returned when the request is not allowed to proceed, and should be aborted. Read more
§

async fn check( &self, ctx: Context<State>, req: Request, ) -> PolicyResult<State, Request, <Either8<A, B, C, D, E, F, G, H> as Policy<State, Request>>::Guard, <Either8<A, B, C, D, E, F, G, H> as Policy<State, Request>>::Error>

Check whether the request is allowed to proceed. Read more
§

impl<A, B, C, D, E, F, G, H, State, Response, Error> Policy<State, Response, Error> for Either8<A, B, C, D, E, F, G, H>
where A: Policy<State, Response, Error>, B: Policy<State, Response, Error>, C: Policy<State, Response, Error>, D: Policy<State, Response, Error>, E: Policy<State, Response, Error>, F: Policy<State, Response, Error>, G: Policy<State, Response, Error>, H: Policy<State, Response, Error>, State: Send + Sync + 'static, Response: Send + 'static, Error: Send + Sync + 'static,

§

async fn retry( &self, ctx: Context<State>, req: Request<RetryBody>, result: Result<Response, Error>, ) -> PolicyResult<State, Response, Error>

Check the policy if a certain request should be retried. Read more
§

fn clone_input( &self, ctx: &Context<State>, req: &Request<RetryBody>, ) -> Option<(Context<State>, Request<RetryBody>)>

Tries to clone a request before being passed to the inner service. Read more
§

impl<A, B, C, D, E, F, G, H> ProxyDB for Either8<A, B, C, D, E, F, G, H>
where A: ProxyDB, <A as ProxyDB>::Error: Into<Box<dyn Error + Send + Sync>>, B: ProxyDB, <B as ProxyDB>::Error: Into<Box<dyn Error + Send + Sync>>, C: ProxyDB, <C as ProxyDB>::Error: Into<Box<dyn Error + Send + Sync>>, D: ProxyDB, <D as ProxyDB>::Error: Into<Box<dyn Error + Send + Sync>>, E: ProxyDB, <E as ProxyDB>::Error: Into<Box<dyn Error + Send + Sync>>, F: ProxyDB, <F as ProxyDB>::Error: Into<Box<dyn Error + Send + Sync>>, G: ProxyDB, <G as ProxyDB>::Error: Into<Box<dyn Error + Send + Sync>>, H: ProxyDB, <H as ProxyDB>::Error: Into<Box<dyn Error + Send + Sync>>,

§

type Error = Box<dyn Error + Send + Sync>

The error type that can be returned by the proxy database Read more
§

async fn get_proxy_if( &self, ctx: TransportContext, filter: ProxyFilter, predicate: impl ProxyQueryPredicate, ) -> Result<Proxy, <Either8<A, B, C, D, E, F, G, H> as ProxyDB>::Error>

Same as Self::get_proxy but with a predicate to filter out found proxies that do not match the given predicate.
§

async fn get_proxy( &self, ctx: TransportContext, filter: ProxyFilter, ) -> Result<Proxy, <Either8<A, B, C, D, E, F, G, H> as ProxyDB>::Error>

Get a Proxy based on the given TransportContext and ProxyFilter, or return an error in case no Proxy could be returned.
§

impl<A, B, C, D, E, F, G, H, State, Request, Response> Service<State, Request> for Either8<A, B, C, D, E, F, G, H>
where A: Service<State, Request, Response = Response>, <A as Service<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, B: Service<State, Request, Response = Response>, <B as Service<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, C: Service<State, Request, Response = Response>, <C as Service<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, D: Service<State, Request, Response = Response>, <D as Service<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, E: Service<State, Request, Response = Response>, <E as Service<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, F: Service<State, Request, Response = Response>, <F as Service<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, G: Service<State, Request, Response = Response>, <G as Service<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, H: Service<State, Request, Response = Response>, <H as Service<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>, Request: Send + 'static, State: Send + Sync + 'static, Response: Send + 'static,

§

type Response = Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Send + Sync>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context<State>, req: Request, ) -> Result<<Either8<A, B, C, D, E, F, G, H> as Service<State, Request>>::Response, <Either8<A, B, C, D, E, F, G, H> as Service<State, Request>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<S, Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<A, B, C, D, E, F, G, H> TcpStreamConnector for Either8<A, B, C, D, E, F, G, H>

§

type Error = Box<dyn Error + Send + Sync>

Type of error that can occurr when establishing the connection failed.
§

async fn connect( &self, addr: SocketAddr, ) -> Result<TcpStream, <Either8<A, B, C, D, E, F, G, H> as TcpStreamConnector>::Error>

Connect to the target via the given SocketAddress to establish a [TcpStream].
§

impl<const SEPARATOR: char, A, B, C, D, E, F, G, H> UsernameLabelWriter<SEPARATOR> for Either8<A, B, C, D, E, F, G, H>
where A: UsernameLabelWriter<SEPARATOR>, B: UsernameLabelWriter<SEPARATOR>, C: UsernameLabelWriter<SEPARATOR>, D: UsernameLabelWriter<SEPARATOR>, E: UsernameLabelWriter<SEPARATOR>, F: UsernameLabelWriter<SEPARATOR>, G: UsernameLabelWriter<SEPARATOR>, H: UsernameLabelWriter<SEPARATOR>,

§

fn write_labels( &self, composer: &mut Composer<SEPARATOR>, ) -> Result<(), ComposeError>

Write all labels into the given Composer.

Auto Trait Implementations§

§

impl<A, B, C, D, E, F, G, H> Freeze for Either8<A, B, C, D, E, F, G, H>
where A: Freeze, B: Freeze, C: Freeze, D: Freeze, E: Freeze, F: Freeze, G: Freeze, H: Freeze,

§

impl<A, B, C, D, E, F, G, H> RefUnwindSafe for Either8<A, B, C, D, E, F, G, H>

§

impl<A, B, C, D, E, F, G, H> Send for Either8<A, B, C, D, E, F, G, H>
where A: Send, B: Send, C: Send, D: Send, E: Send, F: Send, G: Send, H: Send,

§

impl<A, B, C, D, E, F, G, H> Sync for Either8<A, B, C, D, E, F, G, H>
where A: Sync, B: Sync, C: Sync, D: Sync, E: Sync, F: Sync, G: Sync, H: Sync,

§

impl<A, B, C, D, E, F, G, H> Unpin for Either8<A, B, C, D, E, F, G, H>
where A: Unpin, B: Unpin, C: Unpin, D: Unpin, E: Unpin, F: Unpin, G: Unpin, H: Unpin,

§

impl<A, B, C, D, E, F, G, H> UnwindSafe for Either8<A, B, C, D, E, F, G, H>

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
§

impl<R> AsyncReadExt for R
where R: AsyncRead + ?Sized,

§

fn chain<R>(self, next: R) -> Chain<Self, R>
where Self: Sized, R: AsyncRead,

Creates a new AsyncRead instance that chains this stream with next. Read more
§

fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>
where Self: Unpin,

Pulls some bytes from this source into the specified buffer, returning how many bytes were read. Read more
§

fn read_buf<'a, B>(&'a mut self, buf: &'a mut B) -> ReadBuf<'a, Self, B>
where Self: Unpin, B: BufMut + ?Sized,

Pulls some bytes from this source into the specified buffer, advancing the buffer’s internal cursor. Read more
§

fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>
where Self: Unpin,

Reads the exact number of bytes required to fill buf. Read more
§

fn read_u8(&mut self) -> ReadU8<&mut Self>
where Self: Unpin,

Reads an unsigned 8 bit integer from the underlying reader. Read more
§

fn read_i8(&mut self) -> ReadI8<&mut Self>
where Self: Unpin,

Reads a signed 8 bit integer from the underlying reader. Read more
§

fn read_u16(&mut self) -> ReadU16<&mut Self>
where Self: Unpin,

Reads an unsigned 16-bit integer in big-endian order from the underlying reader. Read more
§

fn read_i16(&mut self) -> ReadI16<&mut Self>
where Self: Unpin,

Reads a signed 16-bit integer in big-endian order from the underlying reader. Read more
§

fn read_u32(&mut self) -> ReadU32<&mut Self>
where Self: Unpin,

Reads an unsigned 32-bit integer in big-endian order from the underlying reader. Read more
§

fn read_i32(&mut self) -> ReadI32<&mut Self>
where Self: Unpin,

Reads a signed 32-bit integer in big-endian order from the underlying reader. Read more
§

fn read_u64(&mut self) -> ReadU64<&mut Self>
where Self: Unpin,

Reads an unsigned 64-bit integer in big-endian order from the underlying reader. Read more
§

fn read_i64(&mut self) -> ReadI64<&mut Self>
where Self: Unpin,

Reads an signed 64-bit integer in big-endian order from the underlying reader. Read more
§

fn read_u128(&mut self) -> ReadU128<&mut Self>
where Self: Unpin,

Reads an unsigned 128-bit integer in big-endian order from the underlying reader. Read more
§

fn read_i128(&mut self) -> ReadI128<&mut Self>
where Self: Unpin,

Reads an signed 128-bit integer in big-endian order from the underlying reader. Read more
§

fn read_f32(&mut self) -> ReadF32<&mut Self>
where Self: Unpin,

Reads an 32-bit floating point type in big-endian order from the underlying reader. Read more
§

fn read_f64(&mut self) -> ReadF64<&mut Self>
where Self: Unpin,

Reads an 64-bit floating point type in big-endian order from the underlying reader. Read more
§

fn read_u16_le(&mut self) -> ReadU16Le<&mut Self>
where Self: Unpin,

Reads an unsigned 16-bit integer in little-endian order from the underlying reader. Read more
§

fn read_i16_le(&mut self) -> ReadI16Le<&mut Self>
where Self: Unpin,

Reads a signed 16-bit integer in little-endian order from the underlying reader. Read more
§

fn read_u32_le(&mut self) -> ReadU32Le<&mut Self>
where Self: Unpin,

Reads an unsigned 32-bit integer in little-endian order from the underlying reader. Read more
§

fn read_i32_le(&mut self) -> ReadI32Le<&mut Self>
where Self: Unpin,

Reads a signed 32-bit integer in little-endian order from the underlying reader. Read more
§

fn read_u64_le(&mut self) -> ReadU64Le<&mut Self>
where Self: Unpin,

Reads an unsigned 64-bit integer in little-endian order from the underlying reader. Read more
§

fn read_i64_le(&mut self) -> ReadI64Le<&mut Self>
where Self: Unpin,

Reads an signed 64-bit integer in little-endian order from the underlying reader. Read more
§

fn read_u128_le(&mut self) -> ReadU128Le<&mut Self>
where Self: Unpin,

Reads an unsigned 128-bit integer in little-endian order from the underlying reader. Read more
§

fn read_i128_le(&mut self) -> ReadI128Le<&mut Self>
where Self: Unpin,

Reads an signed 128-bit integer in little-endian order from the underlying reader. Read more
§

fn read_f32_le(&mut self) -> ReadF32Le<&mut Self>
where Self: Unpin,

Reads an 32-bit floating point type in little-endian order from the underlying reader. Read more
§

fn read_f64_le(&mut self) -> ReadF64Le<&mut Self>
where Self: Unpin,

Reads an 64-bit floating point type in little-endian order from the underlying reader. Read more
§

fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>
where Self: Unpin,

Reads all bytes until EOF in this source, placing them into buf. Read more
§

fn read_to_string<'a>( &'a mut self, dst: &'a mut String, ) -> ReadToString<'a, Self>
where Self: Unpin,

Reads all bytes until EOF in this source, appending them to buf. Read more
§

fn take(self, limit: u64) -> Take<Self>
where Self: Sized,

Creates an adaptor which reads at most limit bytes from it. Read more
§

impl<W> AsyncWriteExt for W
where W: AsyncWrite + ?Sized,

§

fn write<'a>(&'a mut self, src: &'a [u8]) -> Write<'a, Self>
where Self: Unpin,

Writes a buffer into this writer, returning how many bytes were written. Read more
§

fn write_vectored<'a, 'b>( &'a mut self, bufs: &'a [IoSlice<'b>], ) -> WriteVectored<'a, 'b, Self>
where Self: Unpin,

Like write, except that it writes from a slice of buffers. Read more
§

fn write_buf<'a, B>(&'a mut self, src: &'a mut B) -> WriteBuf<'a, Self, B>
where Self: Sized + Unpin, B: Buf,

Writes a buffer into this writer, advancing the buffer’s internal cursor. Read more
§

fn write_all_buf<'a, B>( &'a mut self, src: &'a mut B, ) -> WriteAllBuf<'a, Self, B>
where Self: Sized + Unpin, B: Buf,

Attempts to write an entire buffer into this writer. Read more
§

fn write_all<'a>(&'a mut self, src: &'a [u8]) -> WriteAll<'a, Self>
where Self: Unpin,

Attempts to write an entire buffer into this writer. Read more
§

fn write_u8(&mut self, n: u8) -> WriteU8<&mut Self>
where Self: Unpin,

Writes an unsigned 8-bit integer to the underlying writer. Read more
§

fn write_i8(&mut self, n: i8) -> WriteI8<&mut Self>
where Self: Unpin,

Writes a signed 8-bit integer to the underlying writer. Read more
§

fn write_u16(&mut self, n: u16) -> WriteU16<&mut Self>
where Self: Unpin,

Writes an unsigned 16-bit integer in big-endian order to the underlying writer. Read more
§

fn write_i16(&mut self, n: i16) -> WriteI16<&mut Self>
where Self: Unpin,

Writes a signed 16-bit integer in big-endian order to the underlying writer. Read more
§

fn write_u32(&mut self, n: u32) -> WriteU32<&mut Self>
where Self: Unpin,

Writes an unsigned 32-bit integer in big-endian order to the underlying writer. Read more
§

fn write_i32(&mut self, n: i32) -> WriteI32<&mut Self>
where Self: Unpin,

Writes a signed 32-bit integer in big-endian order to the underlying writer. Read more
§

fn write_u64(&mut self, n: u64) -> WriteU64<&mut Self>
where Self: Unpin,

Writes an unsigned 64-bit integer in big-endian order to the underlying writer. Read more
§

fn write_i64(&mut self, n: i64) -> WriteI64<&mut Self>
where Self: Unpin,

Writes an signed 64-bit integer in big-endian order to the underlying writer. Read more
§

fn write_u128(&mut self, n: u128) -> WriteU128<&mut Self>
where Self: Unpin,

Writes an unsigned 128-bit integer in big-endian order to the underlying writer. Read more
§

fn write_i128(&mut self, n: i128) -> WriteI128<&mut Self>
where Self: Unpin,

Writes an signed 128-bit integer in big-endian order to the underlying writer. Read more
§

fn write_f32(&mut self, n: f32) -> WriteF32<&mut Self>
where Self: Unpin,

Writes an 32-bit floating point type in big-endian order to the underlying writer. Read more
§

fn write_f64(&mut self, n: f64) -> WriteF64<&mut Self>
where Self: Unpin,

Writes an 64-bit floating point type in big-endian order to the underlying writer. Read more
§

fn write_u16_le(&mut self, n: u16) -> WriteU16Le<&mut Self>
where Self: Unpin,

Writes an unsigned 16-bit integer in little-endian order to the underlying writer. Read more
§

fn write_i16_le(&mut self, n: i16) -> WriteI16Le<&mut Self>
where Self: Unpin,

Writes a signed 16-bit integer in little-endian order to the underlying writer. Read more
§

fn write_u32_le(&mut self, n: u32) -> WriteU32Le<&mut Self>
where Self: Unpin,

Writes an unsigned 32-bit integer in little-endian order to the underlying writer. Read more
§

fn write_i32_le(&mut self, n: i32) -> WriteI32Le<&mut Self>
where Self: Unpin,

Writes a signed 32-bit integer in little-endian order to the underlying writer. Read more
§

fn write_u64_le(&mut self, n: u64) -> WriteU64Le<&mut Self>
where Self: Unpin,

Writes an unsigned 64-bit integer in little-endian order to the underlying writer. Read more
§

fn write_i64_le(&mut self, n: i64) -> WriteI64Le<&mut Self>
where Self: Unpin,

Writes an signed 64-bit integer in little-endian order to the underlying writer. Read more
§

fn write_u128_le(&mut self, n: u128) -> WriteU128Le<&mut Self>
where Self: Unpin,

Writes an unsigned 128-bit integer in little-endian order to the underlying writer. Read more
§

fn write_i128_le(&mut self, n: i128) -> WriteI128Le<&mut Self>
where Self: Unpin,

Writes an signed 128-bit integer in little-endian order to the underlying writer. Read more
§

fn write_f32_le(&mut self, n: f32) -> WriteF32Le<&mut Self>
where Self: Unpin,

Writes an 32-bit floating point type in little-endian order to the underlying writer. Read more
§

fn write_f64_le(&mut self, n: f64) -> WriteF64Le<&mut Self>
where Self: Unpin,

Writes an 64-bit floating point type in little-endian order to the underlying writer. Read more
§

fn flush(&mut self) -> Flush<'_, Self>
where Self: Unpin,

Flushes this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
§

fn shutdown(&mut self) -> Shutdown<'_, Self>
where Self: Unpin,

Shuts down the output stream, ensuring that the value can be dropped cleanly. 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> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<S, State, Request, Connection> ConnectorService<State, Request> for S
where S: Service<State, Request, Response = EstablishedClientConnection<Connection, State, Request>>, <S as Service<State, Request>>::Error: Into<Box<dyn Error + Send + Sync>>,

§

type Connection = Connection

Connection returned by the ConnectorService
§

type Error = <S as Service<State, Request>>::Error

Error returned in case of connection / setup failure
§

fn connect( &self, ctx: Context<State>, req: Request, ) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<State, Request>>::Connection, State, Request>, <S as ConnectorService<State, Request>>::Error>> + Send

Establish a connection, which often involves some kind of handshake, or connection revival.
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<'e, I, E> EmitAndCount for I
where I: Iterator<Item = &'e E>, E: 'e + BinEncodable,

§

fn emit(&mut self, encoder: &mut BinEncoder<'_>) -> Result<usize, ProtoError>

Emit self to the encoder and return the count of items
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<State, S, Body> HttpClientExt<State> for S
where S: Service<State, Request<Body>, Response = Response<Body>>, <S as Service<State, Request<Body>>>::Error: Into<Box<dyn Error + Send + Sync>>,

§

type ExecuteResponse = Response<Body>

The response type returned by the execute method.
§

type ExecuteError = <S as Service<State, Request<Body>>>::Error

The error type returned by the execute method.
§

fn get( &self, url: impl IntoUrl, ) -> RequestBuilder<'_, S, State, <S as HttpClientExt<State>>::ExecuteResponse>

Convenience method to make a GET request to a URL. Read more
§

fn post( &self, url: impl IntoUrl, ) -> RequestBuilder<'_, S, State, <S as HttpClientExt<State>>::ExecuteResponse>

Convenience method to make a POST request to a URL. Read more
§

fn put( &self, url: impl IntoUrl, ) -> RequestBuilder<'_, S, State, <S as HttpClientExt<State>>::ExecuteResponse>

Convenience method to make a PUT request to a URL. Read more
§

fn patch( &self, url: impl IntoUrl, ) -> RequestBuilder<'_, S, State, <S as HttpClientExt<State>>::ExecuteResponse>

Convenience method to make a PATCH request to a URL. Read more
§

fn delete( &self, url: impl IntoUrl, ) -> RequestBuilder<'_, S, State, <S as HttpClientExt<State>>::ExecuteResponse>

Convenience method to make a DELETE request to a URL. Read more
§

fn head( &self, url: impl IntoUrl, ) -> RequestBuilder<'_, S, State, <S as HttpClientExt<State>>::ExecuteResponse>

Convenience method to make a HEAD request to a URL. Read more
§

fn request( &self, method: Method, url: impl IntoUrl, ) -> RequestBuilder<'_, S, State, <S as HttpClientExt<State>>::ExecuteResponse>

Start building a Request with the Method and Url. Read more
§

fn execute( &self, ctx: Context<State>, request: Request<Body>, ) -> impl Future<Output = Result<<S as HttpClientExt<State>>::ExecuteResponse, <S as HttpClientExt<State>>::ExecuteError>>

Executes a Request. Read more
§

impl<T> Instrument for T

§

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

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

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<I> IntoIterator for I
where I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
§

impl<'a, I, M, State, Request> IteratorMatcherExt<'a, M, State, Request> for I
where I: Iterator<Item = &'a M> + 'a, M: Matcher<State, Request>,

§

fn matches_and( self, ext: Option<&mut Extensions>, ctx: &Context<State>, request: &Request, ) -> bool

Matches in case all Matcher elements match for the given Request within the specified crate::Context.
§

fn matches_or( self, ext: Option<&mut Extensions>, ctx: &Context<State>, request: &Request, ) -> bool

Matches in case any of the Matcher elements match for the given Request within the specified crate::Context.
source§

impl<I> IteratorRandom for I
where I: Iterator,

source§

fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
source§

fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
source§

fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where R: Rng + ?Sized,

Collects values at random from the iterator into a supplied buffer until that buffer is filled. Read more
source§

fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where R: Rng + ?Sized,

Collects amount values at random from the iterator into a vector. Read more
§

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

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

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

§

fn and<S, P, B, E>(self, other: P) -> And<T, P>
where T: Policy<S, B, E>, P: Policy<S, B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
§

fn or<S, P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<S, B, E>, P: Policy<S, B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
source§

impl<T> ToOwned for T
where 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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> ToStringFallible for T
where T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where 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 T
where 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<I> UnicodeNormalization<I> for I
where I: Iterator<Item = char>,

§

fn nfd(self) -> Decompositions<I>

Returns an iterator over the string in Unicode Normalization Form D (canonical decomposition).
§

fn nfkd(self) -> Decompositions<I>

Returns an iterator over the string in Unicode Normalization Form KD (compatibility decomposition).
§

fn nfc(self) -> Recompositions<I>

An Iterator over the string in Unicode Normalization Form C (canonical decomposition followed by canonical composition).
§

fn nfkc(self) -> Recompositions<I>

An Iterator over the string in Unicode Normalization Form KC (compatibility decomposition followed by canonical composition).
§

fn cjk_compat_variants(self) -> Replacements<I>

A transformation which replaces CJK Compatibility Ideograph codepoints with normal forms using Standardized Variation Sequences. This is not part of the canonical or compatibility decomposition algorithms, but performing it before those algorithms produces normalized output which better preserves the intent of the original text. Read more
§

fn stream_safe(self) -> StreamSafe<I>

An Iterator over the string with Conjoining Grapheme Joiner characters inserted according to the Stream-Safe Text Process (UAX15-D4)
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> Stream for T
where T: AsyncRead + AsyncWrite + Send + 'static,