pub enum FieldValue {
Str(String),
Int(i64),
Float(f64),
Bool(bool),
}Expand description
§46: a typed field value on the wire — string literals convert
implicitly (From<&str>/From
Variants§
Implementations§
Source§impl FieldValue
impl FieldValue
Sourcepub fn to_state_value(&self) -> StateValue
pub fn to_state_value(&self) -> StateValue
§46: typed conversion — Str goes through infer_value (a string payload may still BE a number written as text); native types pass through untouched
Trait Implementations§
Source§impl Clone for FieldValue
impl Clone for FieldValue
Source§fn clone(&self) -> FieldValue
fn clone(&self) -> FieldValue
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 FieldValue
impl Debug for FieldValue
Source§impl From<&str> for FieldValue
impl From<&str> for FieldValue
Source§impl From<ClValue> for FieldValue
impl From<ClValue> for FieldValue
Source§impl From<FieldValue> for StateValue
impl From<FieldValue> for StateValue
Source§fn from(f: FieldValue) -> Self
fn from(f: FieldValue) -> Self
Converts to this type from the input type.
Source§impl From<String> for FieldValue
impl From<String> for FieldValue
Source§impl From<bool> for FieldValue
impl From<bool> for FieldValue
Source§impl From<f64> for FieldValue
impl From<f64> for FieldValue
Source§impl From<i64> for FieldValue
impl From<i64> for FieldValue
Source§impl PartialEq for FieldValue
impl PartialEq for FieldValue
impl StructuralPartialEq for FieldValue
Auto Trait Implementations§
impl Freeze for FieldValue
impl RefUnwindSafe for FieldValue
impl Send for FieldValue
impl Sync for FieldValue
impl Unpin for FieldValue
impl UnsafeUnpin for FieldValue
impl UnwindSafe for FieldValue
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