Struct Or
pub struct Or<A, B> { /* private fields */ }
A redirection Policy that combines the results of two Policys.
See [PolicyExt::or][super::PolicyExt::or] for more details.
Trait Implementations
impl<A: Clone, B: Clone> Clone for Or<A, B>
fn clone(&self) -> Self
impl<A: Copy, B: Copy> Copy for Or<A, B>
impl<A: Debug, B: Debug> Debug for Or<A, B>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<A: Default, B: Default> Default for Or<A, B>
fn default() -> Self
impl<Bd, E, A, B> Policy<Bd, E> for Or<A, B>
where
A: Policy<Bd, E>,
B: Policy<Bd, E>,
fn redirect(&mut self, attempt: &Attempt<'_>) -> Result<Action, E>fn on_request(&mut self, request: &mut Request<Bd>)fn clone_body(&self, body: &Bd) -> Option<Bd>
Auto Trait Implementations
impl<A, B> Freeze for Or<A, B>
where
A: Freeze,
B: Freeze,
impl<A, B> RefUnwindSafe for Or<A, B>
where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Or<A, B>
where
A: Send,
B: Send,
impl<A, B> Sync for Or<A, B>
where
A: Sync,
B: Sync,
impl<A, B> Unpin for Or<A, B>
where
A: Unpin,
B: Unpin,
impl<A, B> UnsafeUnpin for Or<A, B>
where
A: UnsafeUnpin,
B: UnsafeUnpin,
impl<A, B> UnwindSafe for Or<A, B>
where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
impl<T> Any for Or<A, B>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Or<A, B>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Or<A, B>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Or<A, B>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Or<A, B>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Or<A, B>
impl<T> PolicyExt for Or<A, B>
where
T: ?Sized,
fn and<P, B, E>(self, other: P) -> And<T, P> where T: Sized + Policy<B, E>, P: Policy<B, E>,fn or<P, B, E>(self, other: P) -> Or<T, P> where T: Sized + Policy<B, E>, P: Policy<B, E>,
impl<T> ToOwned for Or<A, B>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> WithSubscriber for Or<A, B>
impl<T, U> Into<U> for Or<A, B>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Or<A, B>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Or<A, B>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>