#[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
Sourcepub fn set_methods<T, V>(self, v: T) -> Self
pub fn set_methods<T, V>(self, v: T) -> Self
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.
§Example
use google_cloud_networksecurity_v1::model::authorization_policy::rule::destination::HttpHeaderMatch;
let x = Destination::new().set_http_header_match(HttpHeaderMatch::default()/* use setters */);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.
§Example
use google_cloud_networksecurity_v1::model::authorization_policy::rule::destination::HttpHeaderMatch;
let x = Destination::new().set_or_clear_http_header_match(Some(HttpHeaderMatch::default()/* use setters */));
let x = Destination::new().set_or_clear_http_header_match(None::<HttpHeaderMatch>);Trait Implementations§
Source§impl Clone for Destination
impl Clone for Destination
Source§fn clone(&self) -> Destination
fn clone(&self) -> Destination
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Destination
impl Debug for Destination
Source§impl Default for Destination
impl Default for Destination
Source§fn default() -> Destination
fn default() -> Destination
Source§impl Message for Destination
impl Message for Destination
Source§impl PartialEq for Destination
impl PartialEq for Destination
impl StructuralPartialEq for Destination
Auto Trait Implementations§
impl Freeze for Destination
impl RefUnwindSafe for Destination
impl Send for Destination
impl Sync for Destination
impl Unpin for Destination
impl UnsafeUnpin for Destination
impl UnwindSafe for Destination
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request