pub struct Variant<A, AR, AC> { /* private fields */ }Expand description
Combine multiple different service types into a single service.
Implementations
sourceimpl<A, AR, AC> Variant<A, AR, AC> where
A: ServiceFactory<AR, AC>,
AC: Clone,
impl<A, AR, AC> Variant<A, AR, AC> where
A: ServiceFactory<AR, AC>,
AC: Clone,
sourcepub fn v2<B, BR, F>(self, factory: F) -> VariantFactory2<A, AC, B, AR, BR> where
B: ServiceFactory<BR, AC, Response = A::Response, Error = A::Error, InitError = A::InitError>,
F: IntoServiceFactory<B, BR, AC>,
pub fn v2<B, BR, F>(self, factory: F) -> VariantFactory2<A, AC, B, AR, BR> where
B: ServiceFactory<BR, AC, Response = A::Response, Error = A::Error, InitError = A::InitError>,
F: IntoServiceFactory<B, BR, AC>,
Convert to a Variant with two request types
Auto Trait Implementations
impl<A, AR, AC> RefUnwindSafe for Variant<A, AR, AC> where
A: RefUnwindSafe,
AC: RefUnwindSafe,
AR: RefUnwindSafe,
impl<A, AR, AC> Send for Variant<A, AR, AC> where
A: Send,
AC: Send,
AR: Send,
impl<A, AR, AC> Sync for Variant<A, AR, AC> where
A: Sync,
AC: Sync,
AR: Sync,
impl<A, AR, AC> Unpin for Variant<A, AR, AC> where
A: Unpin,
AC: Unpin,
AR: Unpin,
impl<A, AR, AC> UnwindSafe for Variant<A, AR, AC> where
A: UnwindSafe,
AC: UnwindSafe,
AR: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more