#[non_exhaustive]pub struct FeatureSupport {
pub edition_introduced: Edition,
pub edition_deprecated: Edition,
pub deprecation_warning: String,
pub edition_removed: Edition,
/* private fields */
}Expand description
Information about the support window of a feature.
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.edition_introduced: EditionThe edition that this feature was first available in. In editions earlier than this one, the default assigned to EDITION_LEGACY will be used, and proto files will not be able to override it.
edition_deprecated: EditionThe edition this feature becomes deprecated in. Using this after this edition may trigger warnings.
deprecation_warning: StringThe deprecation warning text if this feature is used after the edition it was marked deprecated in.
edition_removed: EditionThe edition this feature is no longer available in. In editions after this one, the last default assigned will be used, and proto files will not be able to override it.
Implementations§
Source§impl FeatureSupport
impl FeatureSupport
pub fn new() -> Self
Sourcepub fn set_edition_introduced<T: Into<Edition>>(self, v: T) -> Self
pub fn set_edition_introduced<T: Into<Edition>>(self, v: T) -> Self
Sets the value of edition_introduced.
§Example
use google_cloud_wkt::Edition;
let x0 = FeatureSupport::new().set_edition_introduced(Edition::Legacy);
let x1 = FeatureSupport::new().set_edition_introduced(Edition::Proto2);
let x2 = FeatureSupport::new().set_edition_introduced(Edition::Proto3);Sourcepub fn set_edition_deprecated<T: Into<Edition>>(self, v: T) -> Self
pub fn set_edition_deprecated<T: Into<Edition>>(self, v: T) -> Self
Sets the value of edition_deprecated.
§Example
use google_cloud_wkt::Edition;
let x0 = FeatureSupport::new().set_edition_deprecated(Edition::Legacy);
let x1 = FeatureSupport::new().set_edition_deprecated(Edition::Proto2);
let x2 = FeatureSupport::new().set_edition_deprecated(Edition::Proto3);Sourcepub fn set_deprecation_warning<T: Into<String>>(self, v: T) -> Self
pub fn set_deprecation_warning<T: Into<String>>(self, v: T) -> Self
Sets the value of deprecation_warning.
§Example
let x = FeatureSupport::new().set_deprecation_warning("example");Sourcepub fn set_edition_removed<T: Into<Edition>>(self, v: T) -> Self
pub fn set_edition_removed<T: Into<Edition>>(self, v: T) -> Self
Sets the value of edition_removed.
§Example
use google_cloud_wkt::Edition;
let x0 = FeatureSupport::new().set_edition_removed(Edition::Legacy);
let x1 = FeatureSupport::new().set_edition_removed(Edition::Proto2);
let x2 = FeatureSupport::new().set_edition_removed(Edition::Proto3);Trait Implementations§
Source§impl Clone for FeatureSupport
impl Clone for FeatureSupport
Source§fn clone(&self) -> FeatureSupport
fn clone(&self) -> FeatureSupport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more