pub enum DataValue {
Bool(bool),
U64(u64),
I64(i64),
F64(f64),
Str(String),
}Variants§
Implementations§
Source§impl DataValue
impl DataValue
pub fn to_bytes( &self, scalar_type: ScalarType, endianness: &Endianness, strict: bool, ) -> Result<Vec<u8>, LayoutError>
pub fn string_to_bytes(&self) -> Result<Vec<u8>, LayoutError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DataValue
impl<'de> Deserialize<'de> for DataValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl TryFrom<&DataValue> for f32
impl TryFrom<&DataValue> for f32
Source§type Error = LayoutError
type Error = LayoutError
The type returned in the event of a conversion error.
Source§impl TryFrom<&DataValue> for f64
impl TryFrom<&DataValue> for f64
Source§type Error = LayoutError
type Error = LayoutError
The type returned in the event of a conversion error.
Source§impl TryFrom<&DataValue> for i128
impl TryFrom<&DataValue> for i128
Source§type Error = LayoutError
type Error = LayoutError
The type returned in the event of a conversion error.
Source§impl TryFrom<&DataValue> for i16
impl TryFrom<&DataValue> for i16
Source§type Error = LayoutError
type Error = LayoutError
The type returned in the event of a conversion error.
Source§impl TryFrom<&DataValue> for i32
impl TryFrom<&DataValue> for i32
Source§type Error = LayoutError
type Error = LayoutError
The type returned in the event of a conversion error.
Source§impl TryFrom<&DataValue> for i64
impl TryFrom<&DataValue> for i64
Source§type Error = LayoutError
type Error = LayoutError
The type returned in the event of a conversion error.
Source§impl TryFrom<&DataValue> for i8
impl TryFrom<&DataValue> for i8
Source§type Error = LayoutError
type Error = LayoutError
The type returned in the event of a conversion error.
Source§impl TryFrom<&DataValue> for u16
impl TryFrom<&DataValue> for u16
Source§type Error = LayoutError
type Error = LayoutError
The type returned in the event of a conversion error.
Source§impl TryFrom<&DataValue> for u32
impl TryFrom<&DataValue> for u32
Source§type Error = LayoutError
type Error = LayoutError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for DataValue
impl RefUnwindSafe for DataValue
impl Send for DataValue
impl Sync for DataValue
impl Unpin for DataValue
impl UnsafeUnpin for DataValue
impl UnwindSafe for DataValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more