Skip to main content

ServiceTypeDescription

Trait ServiceTypeDescription 

Source
pub trait ServiceTypeDescription {
    // Required methods
    fn type_description() -> TypeDescriptionMsg;
    fn service_type_name() -> MessageTypeName;

    // Provided method
    fn compute_hash() -> Result<String> { ... }
}
Expand description

Trait for ROS2 service types that can provide a type description for hash computation

This trait is separate from ServiceMsg (which is for runtime FFI) and only requires TypeDescription on Request/Response types.

Required Methods§

Source

fn type_description() -> TypeDescriptionMsg

Get the type description for this service

The service type description has fields:

  • request_message: Reference to the Request message type
  • response_message: Reference to the Response message type
  • event_message: Reference to the Event message type
Source

fn service_type_name() -> MessageTypeName

Get the service type name information

Provided Methods§

Source

fn compute_hash() -> Result<String>

Compute the RIHS01 type hash for this service

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§