pub struct GrpcRouteMatch {
pub method: Option<GrpcMethodMatch>,
pub headers: Option<Vec<GrpcHeaderMatch>>,
}
Expand description
GrpcRouteMatch 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.
For example, the match below will match a gRPC request only if its service
is foo
AND it contains the version: v1
header:
matches:
- method:
type: Exact
service: "foo"
headers:
- name: "version"
value "v1"
Fields§
§method: Option<GrpcMethodMatch>
Method specifies a gRPC request service/method matcher. If this field is not specified, all services and methods will match.
headers: Option<Vec<GrpcHeaderMatch>>
Headers specifies gRPC request header matchers. Multiple match values are ANDed together, meaning, a request MUST match all the specified headers to select the route.
Trait Implementations§
Source§impl Clone for GrpcRouteMatch
impl Clone for GrpcRouteMatch
Source§fn clone(&self) -> GrpcRouteMatch
fn clone(&self) -> GrpcRouteMatch
Returns a copy 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 GrpcRouteMatch
impl Debug for GrpcRouteMatch
Source§impl Default for GrpcRouteMatch
impl Default for GrpcRouteMatch
Source§fn default() -> GrpcRouteMatch
fn default() -> GrpcRouteMatch
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GrpcRouteMatch
impl<'de> Deserialize<'de> for GrpcRouteMatch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for GrpcRouteMatch
impl JsonSchema for GrpcRouteMatch
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl PartialEq for GrpcRouteMatch
impl PartialEq for GrpcRouteMatch
Source§impl Serialize for GrpcRouteMatch
impl Serialize for GrpcRouteMatch
impl Eq for GrpcRouteMatch
impl StructuralPartialEq for GrpcRouteMatch
Auto Trait Implementations§
impl Freeze for GrpcRouteMatch
impl RefUnwindSafe for GrpcRouteMatch
impl Send for GrpcRouteMatch
impl Sync for GrpcRouteMatch
impl Unpin for GrpcRouteMatch
impl UnwindSafe for GrpcRouteMatch
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