pub trait ServiceMsg:
'static
+ Send
+ Sync {
type Request: TypeSupport;
type Response: TypeSupport;
// Required method
fn type_name() -> &'static str;
// Provided methods
fn type_support() -> *const c_void { ... }
fn type_hash() -> Result<String> { ... }
}Expand description
Trait for ROS2 service message types.
Services consist of a request and response message pair.
Required Associated Types§
Sourcetype Request: TypeSupport
type Request: TypeSupport
The request message type.
Sourcetype Response: TypeSupport
type Response: TypeSupport
The response message type.
Required Methods§
Provided Methods§
Sourcefn type_support() -> *const c_void
fn type_support() -> *const c_void
Returns an opaque pointer to the service type support structure.
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.