[][src]Struct ntex::util::variant::Variant

pub struct Variant<A> { /* fields omitted */ }

Combine multiple different service types into a single service.

Implementations

impl<A> Variant<A> where
    A: ServiceFactory,
    A::Config: Clone
[src]

pub fn and<B, F>(self, factory: F) -> VariantFactory2<A, B> where
    B: ServiceFactory<Config = A::Config, Response = A::Response, Error = A::Error, InitError = A::InitError>,
    F: IntoServiceFactory<B>, 
[src]

Convert to a Variant with two request types

pub fn v2<B, F>(self, factory: F) -> VariantFactory2<A, B> where
    B: ServiceFactory<Config = A::Config, Response = A::Response, Error = A::Error, InitError = A::InitError>,
    F: IntoServiceFactory<B>, 
[src]

Convert to a Variant with two request types

Auto Trait Implementations

impl<A> RefUnwindSafe for Variant<A> where
    A: RefUnwindSafe
[src]

impl<A> Send for Variant<A> where
    A: Send
[src]

impl<A> Sync for Variant<A> where
    A: Sync
[src]

impl<A> Unpin for Variant<A> where
    A: Unpin
[src]

impl<A> UnwindSafe for Variant<A> where
    A: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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