pub trait WrappedTypesupport:
Serialize
+ for<'de> Deserialize<'de>
+ Default
+ Debug
+ Clone {
type CStruct;
// Required methods
fn get_ts() -> &'static rosidl_message_type_support_t;
fn create_msg() -> *mut Self::CStruct;
fn destroy_msg(msg: *mut Self::CStruct);
fn from_native(msg: &Self::CStruct) -> Self;
fn copy_to_native(&self, msg: &mut Self::CStruct);
// Provided methods
fn to_serialized_bytes(&self) -> Result<Vec<u8>> { ... }
fn from_serialized_bytes(data: &[u8]) -> Result<Self> { ... }
}
Required Associated Types§
Required Methods§
fn get_ts() -> &'static rosidl_message_type_support_t
fn create_msg() -> *mut Self::CStruct
fn destroy_msg(msg: *mut Self::CStruct)
fn from_native(msg: &Self::CStruct) -> Self
fn copy_to_native(&self, msg: &mut Self::CStruct)
Provided Methods§
Sourcefn to_serialized_bytes(&self) -> Result<Vec<u8>>
fn to_serialized_bytes(&self) -> Result<Vec<u8>>
This serializes the message using ROS2 methods.
Sourcefn from_serialized_bytes(data: &[u8]) -> Result<Self>
fn from_serialized_bytes(data: &[u8]) -> Result<Self>
This deserializes the message using ROS2 methods.
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.