pub trait TypeDescription {
// Required methods
fn type_description() -> TypeDescriptionMsg;
fn message_type_name() -> MessageTypeName;
// Provided method
fn compute_hash() -> Result<String> { ... }
}Expand description
Trait for types that can provide a ROS2 type description
This trait should be implemented by ROS2 message types to provide the information needed to calculate RIHS01 type hashes.
Required Methods§
Sourcefn type_description() -> TypeDescriptionMsg
fn type_description() -> TypeDescriptionMsg
Get the type description for this type
Returns a complete type description including all referenced types
Sourcefn message_type_name() -> MessageTypeName
fn message_type_name() -> MessageTypeName
Get the message type name information
Returns the prefix, package, and type name needed to construct the full ROS2 message type name.
Provided Methods§
Sourcefn compute_hash() -> Result<String>
fn compute_hash() -> Result<String>
Compute the RIHS01 type hash for this type
This has a default implementation that uses type_description()
and calculates the SHA256 hash according to RIHS01 specification.
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.