#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RoutePolicy
impl Debug for RoutePolicy
Source§impl Default for RoutePolicy
impl Default for RoutePolicy
Source§fn default() -> RoutePolicy
fn default() -> RoutePolicy
Source§impl Message for RoutePolicy
impl Message for RoutePolicy
Source§impl PartialEq for RoutePolicy
impl PartialEq for RoutePolicy
impl StructuralPartialEq for RoutePolicy
Auto Trait Implementations§
impl !Freeze for RoutePolicy
impl RefUnwindSafe for RoutePolicy
impl Send for RoutePolicy
impl Sync for RoutePolicy
impl Unpin for RoutePolicy
impl UnsafeUnpin for RoutePolicy
impl UnwindSafe for RoutePolicy
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