#[non_exhaustive]pub struct FeatureValue {
pub feature_column: String,
pub value: Option<Value>,
/* private fields */
}Expand description
Representative value of a single feature within the cluster.
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.feature_column: StringThe feature column name.
value: Option<Value>Value.
Implementations§
Source§impl FeatureValue
impl FeatureValue
Sourcepub fn set_feature_column<T: Into<String>>(self, v: T) -> Self
pub fn set_feature_column<T: Into<String>>(self, v: T) -> Self
Sets the value of feature_column.
§Example
ⓘ
let x = FeatureValue::new().set_feature_column("example");Sourcepub fn set_value<T: Into<Option<Value>>>(self, v: T) -> Self
pub fn set_value<T: Into<Option<Value>>>(self, v: T) -> Self
Sets the value of value.
Note that all the setters affecting value are mutually
exclusive.
§Example
ⓘ
use wkt::DoubleValue;
let x = FeatureValue::new().set_value(Some(
google_cloud_bigquery_v2::model::model::clustering_metrics::cluster::feature_value::Value::NumericalValue(DoubleValue::default().into())));Sourcepub fn numerical_value(&self) -> Option<&Box<DoubleValue>>
pub fn numerical_value(&self) -> Option<&Box<DoubleValue>>
The value of value
if it holds a NumericalValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_numerical_value<T: Into<Box<DoubleValue>>>(self, v: T) -> Self
pub fn set_numerical_value<T: Into<Box<DoubleValue>>>(self, v: T) -> Self
Sets the value of value
to hold a NumericalValue.
Note that all the setters affecting value are
mutually exclusive.
§Example
ⓘ
use wkt::DoubleValue;
let x = FeatureValue::new().set_numerical_value(DoubleValue::default()/* use setters */);
assert!(x.numerical_value().is_some());
assert!(x.categorical_value().is_none());Sourcepub fn categorical_value(&self) -> Option<&Box<CategoricalValue>>
pub fn categorical_value(&self) -> Option<&Box<CategoricalValue>>
The value of value
if it holds a CategoricalValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_categorical_value<T: Into<Box<CategoricalValue>>>(self, v: T) -> Self
pub fn set_categorical_value<T: Into<Box<CategoricalValue>>>(self, v: T) -> Self
Sets the value of value
to hold a CategoricalValue.
Note that all the setters affecting value are
mutually exclusive.
§Example
ⓘ
use google_cloud_bigquery_v2::model::model::clustering_metrics::cluster::feature_value::CategoricalValue;
let x = FeatureValue::new().set_categorical_value(CategoricalValue::default()/* use setters */);
assert!(x.categorical_value().is_some());
assert!(x.numerical_value().is_none());Trait Implementations§
Source§impl Clone for FeatureValue
impl Clone for FeatureValue
Source§fn clone(&self) -> FeatureValue
fn clone(&self) -> FeatureValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FeatureValue
impl Debug for FeatureValue
Source§impl Default for FeatureValue
impl Default for FeatureValue
Source§fn default() -> FeatureValue
fn default() -> FeatureValue
Returns the “default value” for a type. Read more
Source§impl Message for FeatureValue
impl Message for FeatureValue
Source§impl PartialEq for FeatureValue
impl PartialEq for FeatureValue
impl StructuralPartialEq for FeatureValue
Auto Trait Implementations§
impl Freeze for FeatureValue
impl RefUnwindSafe for FeatureValue
impl Send for FeatureValue
impl Sync for FeatureValue
impl Unpin for FeatureValue
impl UnsafeUnpin for FeatureValue
impl UnwindSafe for FeatureValue
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
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>
Wrap the input message
T in a tonic::Request