pub enum RouteCondition {
RemoteIp(Vec<String>),
NotRemoteIp(Vec<String>),
Header {
name: String,
value: String,
},
NotHeader {
name: String,
value: String,
},
}Expand description
Conditions that can guard a route, evaluated against each incoming request.
Variants§
RemoteIp(Vec<String>)
Match only if the client IP is in one of the given CIDR ranges.
NotRemoteIp(Vec<String>)
Match only if the client IP is NOT in any of the given CIDR ranges.
Header
Match only if the named header equals the given value.
NotHeader
Match only if the named header does NOT equal the given value.
Trait Implementations§
Source§impl Clone for RouteCondition
impl Clone for RouteCondition
Source§fn clone(&self) -> RouteCondition
fn clone(&self) -> RouteCondition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RouteCondition
impl Debug for RouteCondition
Auto Trait Implementations§
impl Freeze for RouteCondition
impl RefUnwindSafe for RouteCondition
impl Send for RouteCondition
impl Sync for RouteCondition
impl Unpin for RouteCondition
impl UnsafeUnpin for RouteCondition
impl UnwindSafe for RouteCondition
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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