pub enum Value {
Show 15 variants Empty(Empty), String(String), Unstructured(Unstructured), Bit(Bit), Integer64(Integer64), Integer32(Integer32), Integer16(Integer16), Integer8(Integer8), Natural64(Natural64), Natural32(Natural32), Natural16(Natural16), Natural8(Natural8), Real64(Real64), Real32(Real32), Real16(Real16),
}
Expand description

uavcan.register.Value.1.0

Size ranges from 1 to 259 bytes

This union contains all possible value types supported by the register protocol. Numeric types can be either scalars or arrays; the former is a special case of the latter.

Variants§

§

Empty(Empty)

Tag 0 Used to represent an undefined value

uavcan.primitive.Empty.1.0

§

String(String)

Tag 1 UTF-8 encoded text

uavcan.primitive.String.1.0

§

Unstructured(Unstructured)

Tag 2 Raw unstructured binary image

uavcan.primitive.Unstructured.1.0

§

Bit(Bit)

Tag 3 Bit array

uavcan.primitive.array.Bit.1.0

§

Integer64(Integer64)

Tag 4

uavcan.primitive.array.Integer64.1.0

§

Integer32(Integer32)

Tag 5

uavcan.primitive.array.Integer32.1.0

§

Integer16(Integer16)

Tag 6

uavcan.primitive.array.Integer16.1.0

§

Integer8(Integer8)

Tag 7

uavcan.primitive.array.Integer8.1.0

§

Natural64(Natural64)

Tag 8

uavcan.primitive.array.Natural64.1.0

§

Natural32(Natural32)

Tag 9

uavcan.primitive.array.Natural32.1.0

§

Natural16(Natural16)

Tag 10

uavcan.primitive.array.Natural16.1.0

§

Natural8(Natural8)

Tag 11

uavcan.primitive.array.Natural8.1.0

§

Real64(Real64)

Tag 12 Exactly representable integers: [-253, +253]

uavcan.primitive.array.Real64.1.0

§

Real32(Real32)

Tag 13 Exactly representable integers: [-16777216, +16777216]

uavcan.primitive.array.Real32.1.0

§

Real16(Real16)

Tag 14 Exactly representable integers: [-2048, +2048] Empty and the tag 258 bytes per field max and the tag

uavcan.primitive.array.Real16.1.0

Trait Implementations§

source§

impl DataType for Value

source§

const EXTENT_BYTES: Option<u32> = None

This type is sealed.

source§

impl Deserialize for Value

source§

fn deserialize(cursor: &mut ReadCursor<'_>) -> Result<Self, DeserializeError>where Self: Sized,

Deserializes a value and returns it
source§

fn deserialize_from_bytes(bytes: &[u8]) -> Result<Self, DeserializeError>where Self: Sized,

A convenience function that creates a cursor around the provided bytes and calls deserialize
source§

impl Serialize for Value

source§

fn size_bits(&self) -> usize

Returns the size of the encoded form of this value, in bits Read more
source§

fn serialize(&self, cursor: &mut WriteCursor<'_>)

Serializes this value into a buffer Read more
source§

fn serialize_to_bytes(&self, bytes: &mut [u8])

A convenience function that creates a cursor around the provided bytes and calls serialize
source§

impl Message for Value

Auto Trait Implementations§

§

impl RefUnwindSafe for Value

§

impl Send for Value

§

impl Sync for Value

§

impl Unpin for Value

§

impl UnwindSafe for Value

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.