#[repr(u32)]pub enum Scalar {
Show 14 variants
Bool = 0,
U8 = 1,
U16 = 2,
U32 = 3,
U64 = 4,
U128 = 5,
I8 = 6,
I16 = 7,
I32 = 8,
I64 = 9,
I128 = 10,
F32 = 11,
F64 = 12,
Char = 13,
}Expand description
Scalar width and signedness. Integer encoding and endianness come from the codec configuration.
Variants§
Bool = 0
Native bool encoding.
U8 = 1
Native u8 encoding.
U16 = 2
Native u16 encoding.
U32 = 3
Native u32 encoding.
U64 = 4
Native u64 encoding.
U128 = 5
Native u128 encoding.
I8 = 6
Native i8 encoding.
I16 = 7
Native i16 encoding.
I32 = 8
Native i32 encoding.
I64 = 9
Native i64 encoding.
I128 = 10
Native i128 encoding.
F32 = 11
Native f32 encoding.
F64 = 12
Native f64 encoding.
Char = 13
Native char encoding.
Trait Implementations§
Source§impl<'de, __Context> BorrowDecode<'de, __Context> for Scalar
impl<'de, __Context> BorrowDecode<'de, __Context> for Scalar
Source§fn borrow_decode<D: BorrowDecoder<'de, Context = __Context>>(
decoder: &mut D,
) -> Result<Self, DecodeError>
fn borrow_decode<D: BorrowDecoder<'de, Context = __Context>>( decoder: &mut D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
impl Copy for Scalar
impl Eq for Scalar
impl StructuralPartialEq for Scalar
Source§impl ValueDecode for Scalar
impl ValueDecode for Scalar
Source§const DECODE: &'static ValueDecodeSpec
const DECODE: &'static ValueDecodeSpec
Complete wire recipe for this encoding.
Source§const METADATA: &'static [ValueMetadata] = _
const METADATA: &'static [ValueMetadata] = _
Static logical metadata retained alongside the wire recipe. Read more
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