pub enum ScalarValue {
Bool(bool),
I8(i8),
I16(i16),
I32(i32),
I64(i64),
U8(u8),
U16(u16),
U32(u32),
U64(u64),
F32(f32),
F64(f64),
Str(String),
}Variants§
Bool(bool)
I8(i8)
I16(i16)
I32(i32)
I64(i64)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
F32(f32)
F64(f64)
Str(String)
Trait Implementations§
Source§impl Clone for ScalarValue
impl Clone for ScalarValue
Source§fn clone(&self) -> ScalarValue
fn clone(&self) -> ScalarValue
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 ScalarValue
impl Debug for ScalarValue
Source§impl PartialEq for ScalarValue
impl PartialEq for ScalarValue
Source§impl PvScalar for ScalarValue
impl PvScalar for ScalarValue
Source§fn from_decoded(dv: &DecodedValue) -> Option<Self>
fn from_decoded(dv: &DecodedValue) -> Option<Self>
Faithful 1:1 structural mapping — deliberately NOT the generic
decoded_to_scalar_value, whose truthy-check-first order turns any
nonzero numeric into Bool (see the trait doc above). Callers that
need a specific wire type re-coerce the returned variant themselves.
Source§const TYPE_NAME: &'static str = "scalar"
const TYPE_NAME: &'static str = "scalar"
Human-readable type name, used in
PvError::TypeMismatch.fn into_scalar(self) -> ScalarValue
fn from_scalar(v: ScalarValue) -> Option<Self>
impl StructuralPartialEq for ScalarValue
Auto Trait Implementations§
impl Freeze for ScalarValue
impl RefUnwindSafe for ScalarValue
impl Send for ScalarValue
impl Sync for ScalarValue
impl Unpin for ScalarValue
impl UnsafeUnpin for ScalarValue
impl UnwindSafe for ScalarValue
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