#[non_exhaustive]pub struct NamedSet {
pub description: Option<String>,
pub elements: Vec<Expr>,
pub fingerprint: Option<Bytes>,
pub name: Option<String>,
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 named set.
elements: Vec<Expr>CEL expressions that are comparable to constructs of this set’s type (see Policy Language).
fingerprint: Option<Bytes>A fingerprint for the Named Set being applied to this Router, which is essentially a hash of the Named Set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the Named Set. You must always provide an up-to-date fingerprint hash in order to update or change labels.
To see the latest fingerprint, make a getNamedSet() request to retrieve a Named Set.
name: Option<String>This set’s name, which must be a resource ID segment and unique within all named sets owned by the Router. Name should conform to RFC1035.
type: Option<Type>This named set’s type
Implementations§
Source§impl NamedSet
impl NamedSet
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 = NamedSet::new().set_or_clear_description(Some("example"));
let x = NamedSet::new().set_or_clear_description(None::<String>);Sourcepub fn set_elements<T, V>(self, v: T) -> Self
pub fn set_elements<T, V>(self, v: T) -> Self
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 = NamedSet::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 = NamedSet::new().set_or_clear_fingerprint(Some(bytes::Bytes::from_static(b"example")));
let x = NamedSet::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§
impl StructuralPartialEq for NamedSet
Auto Trait Implementations§
impl !Freeze for NamedSet
impl RefUnwindSafe for NamedSet
impl Send for NamedSet
impl Sync for NamedSet
impl Unpin for NamedSet
impl UnsafeUnpin for NamedSet
impl UnwindSafe for NamedSet
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