Skip to main content

RosMessage

Trait RosMessage 

Source
pub trait RosMessage:
    Sized
    + Serialize
    + Deserialize {
    const TYPE_NAME: &'static str;
    const TYPE_HASH: &'static str;
}
Expand description

Trait for ROS message types

Identifies a ROS message type by its DDS type name and RIHS hash. All message types implement Serialize and Deserialize.

Required Associated Constants§

Source

const TYPE_NAME: &'static str

Full ROS type name in DDS format

Example: "std_msgs::msg::dds_::String_"

Source

const TYPE_HASH: &'static str

RIHS (ROS Interface Hashing Standard) type hash

Used for type validation between publishers and subscribers. Format: 64-character hex string (SHA-256)

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.

Implementors§