#[non_exhaustive]pub struct StringValues {
pub allowed_values: Vec<String>,
pub denied_values: Vec<String>,
/* private fields */
}Expand description
A message that holds specific allowed and denied values.
This message can define specific values and subtrees of the Resource
Manager resource hierarchy (Organizations, Folders, Projects) that
are allowed or denied. This is achieved by using the under: and
optional is: prefixes.
The under: prefix is used to denote resource subtree values.
The is: prefix is used to denote specific values, and is required only
if the value contains a “:”. Values prefixed with “is:” are treated the
same as values with no prefix.
Ancestry subtrees must be in one of the following formats:
projects/<project-id>(for example,projects/tokyo-rain-123)folders/<folder-id>(for example,folders/1234)organizations/<organization-id>(for example,organizations/1234)
The supports_under field of the associated Constraint defines
whether ancestry prefixes can be used.
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.allowed_values: Vec<String>List of values allowed at this resource.
denied_values: Vec<String>List of values denied at this resource.
Implementations§
Source§impl StringValues
impl StringValues
Sourcepub fn set_allowed_values<T, V>(self, v: T) -> Self
pub fn set_allowed_values<T, V>(self, v: T) -> Self
Sets the value of allowed_values.
§Example
let x = StringValues::new().set_allowed_values(["a", "b", "c"]);Sourcepub fn set_denied_values<T, V>(self, v: T) -> Self
pub fn set_denied_values<T, V>(self, v: T) -> Self
Sets the value of denied_values.
§Example
let x = StringValues::new().set_denied_values(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for StringValues
impl Clone for StringValues
Source§fn clone(&self) -> StringValues
fn clone(&self) -> StringValues
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 StringValues
impl Debug for StringValues
Source§impl Default for StringValues
impl Default for StringValues
Source§fn default() -> StringValues
fn default() -> StringValues
Source§impl Message for StringValues
impl Message for StringValues
Source§impl PartialEq for StringValues
impl PartialEq for StringValues
impl StructuralPartialEq for StringValues
Auto Trait Implementations§
impl Freeze for StringValues
impl RefUnwindSafe for StringValues
impl Send for StringValues
impl Sync for StringValues
impl Unpin for StringValues
impl UnsafeUnpin for StringValues
impl UnwindSafe for StringValues
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