pub struct SgHttpRouteMatch {
pub path: Option<SgHttpPathMatch>,
pub header: Option<Vec<SgHttpHeaderMatch>>,
pub query: Option<Vec<SgHttpQueryMatch>>,
pub method: Option<Vec<SgHttpMethodMatch>>,
}
Expand description
HTTPRouteMatch defines the predicate used to match requests to a given action. Multiple match types are ANDed together, i.e. the match will evaluate to true only if all conditions are satisfied.
Fields§
§path: Option<SgHttpPathMatch>
Path specifies a HTTP request path matcher. If this field is not specified, a default prefix match on the “/” path is provided.
header: Option<Vec<SgHttpHeaderMatch>>
Headers specifies HTTP request header matchers. Multiple match values are ANDed together, meaning, a request must match all the specified headers to select the route.
query: Option<Vec<SgHttpQueryMatch>>
Query specifies HTTP query parameter matchers. Multiple match values are ANDed together, meaning, a request must match all the specified query parameters to select the route.
method: Option<Vec<SgHttpMethodMatch>>
Method specifies HTTP method matcher. When specified, this route will be matched only if the request has the specified method.
Trait Implementations§
Source§impl Clone for SgHttpRouteMatch
impl Clone for SgHttpRouteMatch
Source§fn clone(&self) -> SgHttpRouteMatch
fn clone(&self) -> SgHttpRouteMatch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SgHttpRouteMatch
impl Debug for SgHttpRouteMatch
Source§impl Default for SgHttpRouteMatch
impl Default for SgHttpRouteMatch
Source§fn default() -> SgHttpRouteMatch
fn default() -> SgHttpRouteMatch
Source§impl<'de> Deserialize<'de> for SgHttpRouteMatchwhere
SgHttpRouteMatch: Default,
impl<'de> Deserialize<'de> for SgHttpRouteMatchwhere
SgHttpRouteMatch: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SgHttpRouteMatch, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SgHttpRouteMatch, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for SgHttpRouteMatch
impl Serialize for SgHttpRouteMatch
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for SgHttpRouteMatch
impl RefUnwindSafe for SgHttpRouteMatch
impl Send for SgHttpRouteMatch
impl Sync for SgHttpRouteMatch
impl Unpin for SgHttpRouteMatch
impl UnwindSafe for SgHttpRouteMatch
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more