#[non_exhaustive]pub struct Value {
pub value: Option<Value>,
/* private fields */
}Expand description
Value is the value of the field.
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.value: Option<Value>Implementations§
Source§impl Value
impl Value
pub fn new() -> Self
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.
Sourcepub fn int_value(&self) -> Option<&i64>
pub fn int_value(&self) -> Option<&i64>
The value of value
if it holds a IntValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_int_value<T: Into<i64>>(self, v: T) -> Self
pub fn set_int_value<T: Into<i64>>(self, v: T) -> Self
Sets the value of value
to hold a IntValue.
Note that all the setters affecting value are
mutually exclusive.
Sourcepub fn double_value(&self) -> Option<&f64>
pub fn double_value(&self) -> Option<&f64>
The value of value
if it holds a DoubleValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_double_value<T: Into<f64>>(self, v: T) -> Self
pub fn set_double_value<T: Into<f64>>(self, v: T) -> Self
Sets the value of value
to hold a DoubleValue.
Note that all the setters affecting value are
mutually exclusive.
Sourcepub fn string_value(&self) -> Option<&String>
pub fn string_value(&self) -> Option<&String>
The value of value
if it holds a StringValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_string_value<T: Into<String>>(self, v: T) -> Self
pub fn set_string_value<T: Into<String>>(self, v: T) -> Self
Sets the value of value
to hold a StringValue.
Note that all the setters affecting value are
mutually exclusive.