#[non_exhaustive]pub struct DimensionsInfo {
pub dimensions: HashMap<String, String>,
pub details: Option<QuotaDetails>,
pub applicable_locations: Vec<String>,
/* private fields */
}Expand description
The detailed quota information such as effective quota value for a combination of dimensions.
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.dimensions: HashMap<String, String>The map of dimensions in key-value pairs. The key of a map entry
is “region”, “zone”, or the name of a service-specific dimension, and the
value of a map entry is the value of the dimension. If a dimension does
not appear in the map of dimensions, the dimensions info applies to all
the dimension values except for those that have another DimensionInfo
instance configured for the specific value.
For example: {"provider" : "Example Organization"} where provider is a
service-specific quota dimension and Example Organization is the provider
name.
details: Option<QuotaDetails>Quota details for the specified dimensions.
applicable_locations: Vec<String>The applicable regions or zones of this dimension. The field is set to [‘global’] for quotas that are not per region or per zone. Otherwise, it will be set to the list of locations this dimension info is applicable to.
Implementations§
Source§impl DimensionsInfo
impl DimensionsInfo
Sourcepub fn set_dimensions<T, K, V>(self, v: T) -> Self
pub fn set_dimensions<T, K, V>(self, v: T) -> Self
Sets the value of dimensions.
§Example
let x = DimensionsInfo::new().set_dimensions([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_details<T>(self, v: T) -> Selfwhere
T: Into<QuotaDetails>,
pub fn set_details<T>(self, v: T) -> Selfwhere
T: Into<QuotaDetails>,
Sourcepub fn set_or_clear_details<T>(self, v: Option<T>) -> Selfwhere
T: Into<QuotaDetails>,
pub fn set_or_clear_details<T>(self, v: Option<T>) -> Selfwhere
T: Into<QuotaDetails>,
Sourcepub fn set_applicable_locations<T, V>(self, v: T) -> Self
pub fn set_applicable_locations<T, V>(self, v: T) -> Self
Sets the value of applicable_locations.
§Example
let x = DimensionsInfo::new().set_applicable_locations(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for DimensionsInfo
impl Clone for DimensionsInfo
Source§fn clone(&self) -> DimensionsInfo
fn clone(&self) -> DimensionsInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more