#[non_exhaustive]pub struct RoutePolicy {
pub description: Option<String>,
pub fingerprint: Option<Bytes>,
pub name: Option<String>,
pub terms: Vec<RoutePolicyPolicyTerm>,
pub type: Option<Type>,
/* private fields */
}routers only.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.description: Option<String>An optional description of route policy.
fingerprint: Option<Bytes>A fingerprint for the Route Policy being applied to this Router, which is essentially a hash of the Route Policy used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update Route Policy. You must always provide an up-to-date fingerprint hash in order to update or change labels.
To see the latest fingerprint, make a getRoutePolicy() request to retrieve a Route Policy.
name: Option<String>Route Policy name, which must be a resource ID segment and unique within all the router’s Route Policies. Name should conform to RFC1035.
terms: Vec<RoutePolicyPolicyTerm>List of terms (the order in the list is not important, they are evaluated in order of priority). Order of policies is not retained and might change when getting policy later.
type: Option<Type>Implementations§
Source§impl RoutePolicy
impl RoutePolicy
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 = RoutePolicy::new().set_or_clear_description(Some("example"));
let x = RoutePolicy::new().set_or_clear_description(None::<String>);Sourcepub fn set_fingerprint<T>(self, v: T) -> Self
pub fn set_fingerprint<T>(self, v: T) -> Self
Sets the value of fingerprint.
§Example
let x = RoutePolicy::new().set_fingerprint(bytes::Bytes::from_static(b"example"));Sourcepub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
Sets or clears the value of fingerprint.
§Example
let x = RoutePolicy::new().set_or_clear_fingerprint(Some(bytes::Bytes::from_static(b"example")));
let x = RoutePolicy::new().set_or_clear_fingerprint(None::<bytes::Bytes>);Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_type<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for RoutePolicy
impl Clone for RoutePolicy
Source§fn clone(&self) -> RoutePolicy
fn clone(&self) -> RoutePolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more