Skip to main content

TypeId

Struct TypeId 

Source
pub struct TypeId;
Expand description

Type ID constants matching ROS 2 RIHS01 specification

Implementations§

Source§

impl TypeId

Source

pub const NESTED_TYPE: u8 = 1

Nested message type (single)

Source

pub const INT8: u8 = 2

int8 (single)

Source

pub const UINT8: u8 = 3

uint8/byte/char (single)

Source

pub const INT16: u8 = 4

int16 (single)

Source

pub const UINT16: u8 = 5

uint16 (single)

Source

pub const INT32: u8 = 6

int32 (single)

Source

pub const UINT32: u8 = 7

uint32 (single)

Source

pub const INT64: u8 = 8

int64 (single)

Source

pub const UINT64: u8 = 9

uint64 (single)

Source

pub const FLOAT32: u8 = 10

float32 (single)

Source

pub const FLOAT64: u8 = 11

float64 (single)

Source

pub const BOOL: u8 = 15

bool (single)

Source

pub const BYTE: u8 = 16

byte (alias for uint8)

Source

pub const STRING: u8 = 17

string (single)

Source

pub const WSTRING: u8 = 18

wstring (single) - wide string

Source

pub const FIXED_STRING: u8 = 19

fixed string (single)

Source

pub const FIXED_WSTRING: u8 = 20

fixed wstring (single)

Source

pub const BOUNDED_STRING: u8 = 21

bounded string (single) - string with max length

Source

pub const BOUNDED_WSTRING: u8 = 22

bounded wstring (single)

Source

pub const NESTED_TYPE_ARRAY: u8 = 49

Nested message type (fixed array)

Source

pub const INT8_ARRAY: u8 = 50

int8 (fixed array)

Source

pub const UINT8_ARRAY: u8 = 51

uint8/byte/char (fixed array)

Source

pub const INT16_ARRAY: u8 = 52

int16 (fixed array)

Source

pub const UINT16_ARRAY: u8 = 53

uint16 (fixed array)

Source

pub const INT32_ARRAY: u8 = 54

int32 (fixed array)

Source

pub const UINT32_ARRAY: u8 = 55

uint32 (fixed array)

Source

pub const INT64_ARRAY: u8 = 56

int64 (fixed array)

Source

pub const UINT64_ARRAY: u8 = 57

uint64 (fixed array)

Source

pub const FLOAT32_ARRAY: u8 = 58

float32 (fixed array)

Source

pub const FLOAT64_ARRAY: u8 = 59

float64 (fixed array)

Source

pub const BOOL_ARRAY: u8 = 63

bool (fixed array)

Source

pub const STRING_ARRAY: u8 = 65

string (fixed array)

Source

pub const NESTED_TYPE_BOUNDED_SEQUENCE: u8 = 97

Nested message type (bounded sequence)

Source

pub const INT8_BOUNDED_SEQUENCE: u8 = 98

int8 (bounded sequence)

Source

pub const UINT8_BOUNDED_SEQUENCE: u8 = 99

uint8/byte/char (bounded sequence)

Source

pub const INT16_BOUNDED_SEQUENCE: u8 = 100

int16 (bounded sequence)

Source

pub const UINT16_BOUNDED_SEQUENCE: u8 = 101

uint16 (bounded sequence)

Source

pub const INT32_BOUNDED_SEQUENCE: u8 = 102

int32 (bounded sequence)

Source

pub const UINT32_BOUNDED_SEQUENCE: u8 = 103

uint32 (bounded sequence)

Source

pub const INT64_BOUNDED_SEQUENCE: u8 = 104

int64 (bounded sequence)

Source

pub const UINT64_BOUNDED_SEQUENCE: u8 = 105

uint64 (bounded sequence)

Source

pub const FLOAT32_BOUNDED_SEQUENCE: u8 = 106

float32 (bounded sequence)

Source

pub const FLOAT64_BOUNDED_SEQUENCE: u8 = 107

float64 (bounded sequence)

Source

pub const BOOL_BOUNDED_SEQUENCE: u8 = 111

bool (bounded sequence)

Source

pub const STRING_BOUNDED_SEQUENCE: u8 = 113

string (bounded sequence)

Source

pub const NESTED_TYPE_UNBOUNDED_SEQUENCE: u8 = 145

Nested message type (unbounded sequence)

Source

pub const INT8_UNBOUNDED_SEQUENCE: u8 = 146

int8 (unbounded sequence)

Source

pub const UINT8_UNBOUNDED_SEQUENCE: u8 = 147

uint8/byte/char (unbounded sequence)

Source

pub const INT16_UNBOUNDED_SEQUENCE: u8 = 148

int16 (unbounded sequence)

Source

pub const UINT16_UNBOUNDED_SEQUENCE: u8 = 149

uint16 (unbounded sequence)

Source

pub const INT32_UNBOUNDED_SEQUENCE: u8 = 150

int32 (unbounded sequence)

Source

pub const UINT32_UNBOUNDED_SEQUENCE: u8 = 151

uint32 (unbounded sequence)

Source

pub const INT64_UNBOUNDED_SEQUENCE: u8 = 152

int64 (unbounded sequence)

Source

pub const UINT64_UNBOUNDED_SEQUENCE: u8 = 153

uint64 (unbounded sequence)

Source

pub const FLOAT32_UNBOUNDED_SEQUENCE: u8 = 154

float32 (unbounded sequence)

Source

pub const FLOAT64_UNBOUNDED_SEQUENCE: u8 = 155

float64 (unbounded sequence)

Source

pub const BOOL_UNBOUNDED_SEQUENCE: u8 = 159

bool (unbounded sequence)

Source

pub const STRING_UNBOUNDED_SEQUENCE: u8 = 161

string (unbounded sequence)

Source

pub const ARRAY_OFFSET: u8 = 48

Offset to convert single type to fixed array

Source

pub const BOUNDED_SEQUENCE_OFFSET: u8 = 96

Offset to convert single type to bounded sequence

Source

pub const UNBOUNDED_SEQUENCE_OFFSET: u8 = 144

Offset to convert single type to unbounded sequence

Source

pub const fn is_nested(type_id: u8) -> bool

Check if a type ID is a nested (message) type

Source

pub const fn is_array(type_id: u8) -> bool

Check if a type ID is an array (fixed size)

Source

pub const fn is_bounded_sequence(type_id: u8) -> bool

Check if a type ID is a bounded sequence

Source

pub const fn is_unbounded_sequence(type_id: u8) -> bool

Check if a type ID is an unbounded sequence

Source

pub const fn is_single(type_id: u8) -> bool

Check if a type ID is a single (non-array, non-sequence) value

Source

pub const fn base_type(type_id: u8) -> u8

Get the base type ID (strip array/sequence modifier)

Source

pub const fn type_name(type_id: u8) -> Option<&'static str>

Get the type name for a base type ID

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.