#[non_exhaustive]pub struct HostRule {
pub description: Option<String>,
pub hosts: Vec<String>,
pub path_matcher: Option<String>,
/* private fields */
}Available on crate features
region-url-maps or url-maps only.Expand description
UrlMaps A host-matching rule for a URL. If matched, will use the namedPathMatcher to select the BackendService.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.description: Option<String>An optional description of this resource. Provide this property when you create the resource.
hosts: Vec<String>The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port.* matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or ..
- based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
path_matcher: Option<String>The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
Implementations§
Source§impl HostRule
impl HostRule
pub fn new() -> Self
Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
ⓘ
let x = HostRule::new().set_or_clear_description(Some("example"));
let x = HostRule::new().set_or_clear_description(None::<String>);Sourcepub fn set_path_matcher<T>(self, v: T) -> Self
pub fn set_path_matcher<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_path_matcher<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_path_matcher<T>(self, v: Option<T>) -> Self
Sets or clears the value of path_matcher.
§Example
ⓘ
let x = HostRule::new().set_or_clear_path_matcher(Some("example"));
let x = HostRule::new().set_or_clear_path_matcher(None::<String>);Trait Implementations§
impl StructuralPartialEq for HostRule
Auto Trait Implementations§
impl Freeze for HostRule
impl RefUnwindSafe for HostRule
impl Send for HostRule
impl Sync for HostRule
impl Unpin for HostRule
impl UnwindSafe for HostRule
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