pub enum ImmediateValue {
Empty,
Bytes1([u8; 1]),
Bytes2([u8; 2]),
Bytes4([u8; 4]),
Bytes8([u8; 8]),
}Expand description
A zero-to-8 byte immediate value
Many CBOR encodings use an integer value that can range from zero to 8 bytes in length. This is often used to encode the length of some data, or may be the payload value itself (in the case of integers or floats).
The contained array is in big-endian format.
Variants§
Empty
No immediate value.
Bytes1([u8; 1])
One-byte immediate value.
Bytes2([u8; 2])
Two-byte immediate value.
Bytes4([u8; 4])
Four-byte immediate value.
Bytes8([u8; 8])
Eight-byte immediate value.
Trait Implementations§
Source§impl Clone for ImmediateValue
impl Clone for ImmediateValue
Source§fn clone(&self) -> ImmediateValue
fn clone(&self) -> ImmediateValue
Returns a duplicate of the value. Read more
1.0.0 · 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 ImmediateValue
impl Debug for ImmediateValue
Source§impl Display for ImmediateValue
impl Display for ImmediateValue
Source§impl From<ImmediateValue> for u64
impl From<ImmediateValue> for u64
Source§fn from(imm: ImmediateValue) -> u64
fn from(imm: ImmediateValue) -> u64
Converts to this type from the input type.
Source§impl From<f16> for ImmediateValue
impl From<f16> for ImmediateValue
Source§impl From<f32> for ImmediateValue
impl From<f32> for ImmediateValue
Source§impl From<f64> for ImmediateValue
impl From<f64> for ImmediateValue
Source§impl From<u16> for ImmediateValue
impl From<u16> for ImmediateValue
Source§impl From<u32> for ImmediateValue
impl From<u32> for ImmediateValue
Source§impl From<u64> for ImmediateValue
impl From<u64> for ImmediateValue
Source§impl From<u8> for ImmediateValue
impl From<u8> for ImmediateValue
Source§impl<'a> IntoIterator for &'a ImmediateValue
impl<'a> IntoIterator for &'a ImmediateValue
Source§impl PartialEq for ImmediateValue
impl PartialEq for ImmediateValue
impl Copy for ImmediateValue
impl StructuralPartialEq for ImmediateValue
Auto Trait Implementations§
impl Freeze for ImmediateValue
impl RefUnwindSafe for ImmediateValue
impl Send for ImmediateValue
impl Sync for ImmediateValue
impl Unpin for ImmediateValue
impl UnwindSafe for ImmediateValue
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