Trait r2r::WrappedTypesupport
source · 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.
Object Safety§
This trait is not object safe.