#[non_exhaustive]pub struct FeatureSetDefaults {
pub defaults: Vec<FeatureSetEditionDefault>,
pub minimum_edition: Edition,
pub maximum_edition: Edition,
/* private fields */
}Expand description
A compiled specification for the defaults of a set of features. These messages are generated from FeatureSet extensions and can be used to seed feature resolution. The resolution with this object becomes a simple search for the closest matching edition, followed by proto merges.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.defaults: Vec<FeatureSetEditionDefault>§minimum_edition: EditionThe minimum supported edition (inclusive) when this was constructed. Editions before this will not have defaults.
maximum_edition: EditionThe maximum known edition (inclusive) when this was constructed. Editions after this will not have reliable defaults.
Implementations§
Source§impl FeatureSetDefaults
impl FeatureSetDefaults
pub fn new() -> Self
Sourcepub fn set_defaults<T, V>(self, v: T) -> Self
pub fn set_defaults<T, V>(self, v: T) -> Self
Sourcepub fn set_minimum_edition<T: Into<Edition>>(self, v: T) -> Self
pub fn set_minimum_edition<T: Into<Edition>>(self, v: T) -> Self
Sets the value of minimum_edition.
§Example
ⓘ
use google_cloud_wkt::Edition;
let x0 = FeatureSetDefaults::new().set_minimum_edition(Edition::Legacy);
let x1 = FeatureSetDefaults::new().set_minimum_edition(Edition::Proto2);
let x2 = FeatureSetDefaults::new().set_minimum_edition(Edition::Proto3);Sourcepub fn set_maximum_edition<T: Into<Edition>>(self, v: T) -> Self
pub fn set_maximum_edition<T: Into<Edition>>(self, v: T) -> Self
Sets the value of maximum_edition.
§Example
ⓘ
use google_cloud_wkt::Edition;
let x0 = FeatureSetDefaults::new().set_maximum_edition(Edition::Legacy);
let x1 = FeatureSetDefaults::new().set_maximum_edition(Edition::Proto2);
let x2 = FeatureSetDefaults::new().set_maximum_edition(Edition::Proto3);Trait Implementations§
Source§impl Clone for FeatureSetDefaults
impl Clone for FeatureSetDefaults
Source§fn clone(&self) -> FeatureSetDefaults
fn clone(&self) -> FeatureSetDefaults
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FeatureSetDefaults
impl Debug for FeatureSetDefaults
Source§impl Default for FeatureSetDefaults
impl Default for FeatureSetDefaults
Source§fn default() -> FeatureSetDefaults
fn default() -> FeatureSetDefaults
Returns the “default value” for a type. Read more
Source§impl Message for FeatureSetDefaults
impl Message for FeatureSetDefaults
Source§impl PartialEq for FeatureSetDefaults
impl PartialEq for FeatureSetDefaults
impl StructuralPartialEq for FeatureSetDefaults
Auto Trait Implementations§
impl Freeze for FeatureSetDefaults
impl RefUnwindSafe for FeatureSetDefaults
impl Send for FeatureSetDefaults
impl Sync for FeatureSetDefaults
impl Unpin for FeatureSetDefaults
impl UnwindSafe for FeatureSetDefaults
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
Mutably borrows from an owned value. Read more