pub trait Message: Sized {
const TYPE_NAME: &'static str;
const FIELDS: &'static [Field];
}Expand description
Trait implemented by every generated ROS message type for runtime introspection.
Provides the ROS type name plus the static field schema. Implementors
also typically implement crate::Serialize + crate::Deserialize
for the CDR fast path; this trait is the introspection surface used
by RMW backends that build type descriptors at runtime.
All items are &'static, so the trait is fully usable in no_std +
alloc-free environments. The blanket bound is just Sized — no
Serialize / Deserialize super-bound, so verification-only mirror
types (nros-ghost-types) and CycloneDDS-only “descriptor probe”
types can implement Message without dragging the CDR codecs in.
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.