pub struct Variant<A, AR, AC> { /* private fields */ }
Expand description
Combine multiple different service types into a single service.
Implementations§
source§impl<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
Trait Implementations§
Auto Trait Implementations§
impl<A, AR, AC> Freeze for Variant<A, AR, AC>where
A: Freeze,
impl<A, AR, AC> RefUnwindSafe for Variant<A, AR, AC>
impl<A, AR, AC> Send for Variant<A, AR, AC>
impl<A, AR, AC> Sync for Variant<A, AR, AC>
impl<A, AR, AC> Unpin for Variant<A, AR, AC>
impl<A, AR, AC> UnwindSafe for Variant<A, AR, AC>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more