#[non_exhaustive]pub struct Destination {
pub hosts: Vec<String>,
pub ports: Vec<u32>,
pub methods: Vec<String>,
pub http_header_match: Option<HttpHeaderMatch>,
/* private fields */
}Expand description
Specification of traffic destination attributes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.hosts: Vec<String>Required. List of host names to match. Matched against the “:authority” header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example “mydomain.”) or a suffix match (example “.myorg.com”) or a presence (any) match “*”.
ports: Vec<u32>Required. List of destination ports to match. At least one port should match.
methods: Vec<String>Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
http_header_match: Option<HttpHeaderMatch>Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
Implementations§
Source§impl Destination
impl Destination
pub fn new() -> Self
Sourcepub fn set_methods<T, V>(self, v: T) -> Self
pub fn set_methods<T, V>(self, v: T) -> Self
Sets the value of methods.
Sourcepub fn set_http_header_match<T>(self, v: T) -> Selfwhere
T: Into<HttpHeaderMatch>,
pub fn set_http_header_match<T>(self, v: T) -> Selfwhere
T: Into<HttpHeaderMatch>,
Sets the value of http_header_match.
Sourcepub fn set_or_clear_http_header_match<T>(self, v: Option<T>) -> Selfwhere
T: Into<HttpHeaderMatch>,
pub fn set_or_clear_http_header_match<T>(self, v: Option<T>) -> Selfwhere
T: Into<HttpHeaderMatch>,
Sets or clears the value of http_header_match.
Trait Implementations§
Source§impl Clone for Destination
impl Clone for Destination
Source§fn clone(&self) -> Destination
fn clone(&self) -> Destination
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more