#[non_exhaustive]pub enum Scalar {
U(u64),
I(u64),
F32,
F64,
Bool,
ByteBool,
}Expand description
A scalar field type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
U(u64)
An unsigned integer of this many bits, at most 128: 8, 16, 32, 64 or 128 in byte mode.
I(u64)
A signed integer of this many bits, sign-extended.
F32
f32.
F64
f64.
Bool
bool, one bit wide.
ByteBool
bool as a whole byte, the form a byte-mode layout or message takes.
Decode reads 0 as false and 1 as true, and refuses any other byte with
ParseError::Malformed. Encode writes 0 or 1. For a flag the
format sets with any nonzero value, use a Kind::Codec of layline::Nonzero.
Implementations§
Trait Implementations§
impl Copy for Scalar
impl Eq for Scalar
impl StructuralPartialEq for Scalar
Auto Trait Implementations§
impl Freeze for Scalar
impl RefUnwindSafe for Scalar
impl Send for Scalar
impl Sync for Scalar
impl Unpin for Scalar
impl UnsafeUnpin for Scalar
impl UnwindSafe for Scalar
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