pub enum FieldType {
}Expand description
CDR / ROS-IDL type of a single field.
Covers every variant Cyclone DDS’ dynamic-type C API needs for
constructing a dds_topic_descriptor_t at runtime:
- primitives (bool, [iu]{8,16,32,64}, f{32,64})
- strings (unbounded / bounded; narrow / wide)
- nested structs (recurse into a child
&'static [Field]) - fixed-size arrays (
T[N]) - unbounded sequences (
sequence<T>) - bounded sequences (
sequence<T, N>)
The recursive variants (Nested, Array, Sequence, BoundedSequence)
take a &'static reference so the entire schema graph stays in .rodata
with no heap touch.
Variants§
Bool
IDL boolean — 1 byte, no alignment.
Uint8
IDL octet / uint8 — 1 byte, no alignment.
Int8
IDL int8 — 1 byte, no alignment.
Uint16
IDL uint16 — 2 bytes, 2-byte aligned.
Int16
IDL int16 — 2 bytes, 2-byte aligned.
Uint32
IDL uint32 — 4 bytes, 4-byte aligned.
Int32
IDL int32 — 4 bytes, 4-byte aligned.
Uint64
IDL uint64 — 8 bytes, 8-byte aligned.
Int64
IDL int64 — 8 bytes, 8-byte aligned.
Float32
IDL float / float32 — 4 bytes, 4-byte aligned.
Float64
IDL double / float64 — 8 bytes, 8-byte aligned.
String
Unbounded string (UTF-8 narrow).
WString
Unbounded wstring (UTF-16 wide).
BoundedString(usize)
Bounded string<N> (UTF-8 narrow, max N bytes excluding null).
BoundedWString(usize)
Bounded wstring<N> (UTF-16 wide, max N code units).
Nested(&'static NestedType)
Nested struct field; the inner slice is the child’s schema.
Array(usize, &'static FieldType)
Fixed-size array T[N].
Sequence(&'static FieldType)
Unbounded sequence<T>.
BoundedSequence(usize, &'static FieldType)
Bounded sequence<T, N>.