pub mod rmw {
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
#[link(name = "lifecycle_msgs__rosidl_typesupport_c")]
extern "C" {
fn rosidl_typesupport_c__get_message_type_support_handle__lifecycle_msgs__msg__State() -> *const std::ffi::c_void;
}
#[link(name = "lifecycle_msgs__rosidl_generator_c")]
extern "C" {
fn lifecycle_msgs__msg__State__init(msg: *mut State) -> bool;
fn lifecycle_msgs__msg__State__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<State>, size: usize) -> bool;
fn lifecycle_msgs__msg__State__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<State>);
fn lifecycle_msgs__msg__State__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<State>, out_seq: *mut rosidl_runtime_rs::Sequence<State>) -> bool;
}
#[repr(C)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct State {
pub id: u8,
pub label: rosidl_runtime_rs::String,
}
impl State {
pub const PRIMARY_STATE_UNKNOWN: u8 = 0;
pub const PRIMARY_STATE_UNCONFIGURED: u8 = 1;
pub const PRIMARY_STATE_INACTIVE: u8 = 2;
pub const PRIMARY_STATE_ACTIVE: u8 = 3;
pub const PRIMARY_STATE_FINALIZED: u8 = 4;
pub const TRANSITION_STATE_CONFIGURING: u8 = 10;
pub const TRANSITION_STATE_CLEANINGUP: u8 = 11;
pub const TRANSITION_STATE_SHUTTINGDOWN: u8 = 12;
pub const TRANSITION_STATE_ACTIVATING: u8 = 13;
pub const TRANSITION_STATE_DEACTIVATING: u8 = 14;
pub const TRANSITION_STATE_ERRORPROCESSING: u8 = 15;
}
impl Default for State {
fn default() -> Self {
unsafe {
let mut msg = std::mem::zeroed();
if !lifecycle_msgs__msg__State__init(&mut msg as *mut _) {
panic!("Call to lifecycle_msgs__msg__State__init() failed");
}
msg
}
}
}
impl rosidl_runtime_rs::SequenceAlloc for State {
fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
unsafe { lifecycle_msgs__msg__State__Sequence__init(seq as *mut _, size) }
}
fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
unsafe { lifecycle_msgs__msg__State__Sequence__fini(seq as *mut _) }
}
fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
unsafe { lifecycle_msgs__msg__State__Sequence__copy(in_seq, out_seq as *mut _) }
}
}
impl rosidl_runtime_rs::Message for State {
type RmwMsg = Self;
fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}
impl rosidl_runtime_rs::RmwMessage for State where Self: Sized {
const TYPE_NAME: &'static str = "lifecycle_msgs/msg/State";
fn get_type_support() -> *const std::ffi::c_void {
unsafe { rosidl_typesupport_c__get_message_type_support_handle__lifecycle_msgs__msg__State() }
}
}
#[link(name = "lifecycle_msgs__rosidl_typesupport_c")]
extern "C" {
fn rosidl_typesupport_c__get_message_type_support_handle__lifecycle_msgs__msg__Transition() -> *const std::ffi::c_void;
}
#[link(name = "lifecycle_msgs__rosidl_generator_c")]
extern "C" {
fn lifecycle_msgs__msg__Transition__init(msg: *mut Transition) -> bool;
fn lifecycle_msgs__msg__Transition__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<Transition>, size: usize) -> bool;
fn lifecycle_msgs__msg__Transition__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<Transition>);
fn lifecycle_msgs__msg__Transition__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<Transition>, out_seq: *mut rosidl_runtime_rs::Sequence<Transition>) -> bool;
}
#[repr(C)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct Transition {
pub id: u8,
pub label: rosidl_runtime_rs::String,
}
impl Transition {
pub const TRANSITION_CREATE: u8 = 0;
pub const TRANSITION_CONFIGURE: u8 = 1;
pub const TRANSITION_CLEANUP: u8 = 2;
pub const TRANSITION_ACTIVATE: u8 = 3;
pub const TRANSITION_DEACTIVATE: u8 = 4;
pub const TRANSITION_UNCONFIGURED_SHUTDOWN: u8 = 5;
pub const TRANSITION_INACTIVE_SHUTDOWN: u8 = 6;
pub const TRANSITION_ACTIVE_SHUTDOWN: u8 = 7;
pub const TRANSITION_DESTROY: u8 = 8;
pub const TRANSITION_ON_CONFIGURE_SUCCESS: u8 = 10;
pub const TRANSITION_ON_CONFIGURE_FAILURE: u8 = 11;
pub const TRANSITION_ON_CONFIGURE_ERROR: u8 = 12;
pub const TRANSITION_ON_CLEANUP_SUCCESS: u8 = 20;
pub const TRANSITION_ON_CLEANUP_FAILURE: u8 = 21;
pub const TRANSITION_ON_CLEANUP_ERROR: u8 = 22;
pub const TRANSITION_ON_ACTIVATE_SUCCESS: u8 = 30;
pub const TRANSITION_ON_ACTIVATE_FAILURE: u8 = 31;
pub const TRANSITION_ON_ACTIVATE_ERROR: u8 = 32;
pub const TRANSITION_ON_DEACTIVATE_SUCCESS: u8 = 40;
pub const TRANSITION_ON_DEACTIVATE_FAILURE: u8 = 41;
pub const TRANSITION_ON_DEACTIVATE_ERROR: u8 = 42;
pub const TRANSITION_ON_SHUTDOWN_SUCCESS: u8 = 50;
pub const TRANSITION_ON_SHUTDOWN_FAILURE: u8 = 51;
pub const TRANSITION_ON_SHUTDOWN_ERROR: u8 = 52;
pub const TRANSITION_ON_ERROR_SUCCESS: u8 = 60;
pub const TRANSITION_ON_ERROR_FAILURE: u8 = 61;
pub const TRANSITION_ON_ERROR_ERROR: u8 = 62;
pub const TRANSITION_CALLBACK_SUCCESS: u8 = 97;
pub const TRANSITION_CALLBACK_FAILURE: u8 = 98;
pub const TRANSITION_CALLBACK_ERROR: u8 = 99;
}
impl Default for Transition {
fn default() -> Self {
unsafe {
let mut msg = std::mem::zeroed();
if !lifecycle_msgs__msg__Transition__init(&mut msg as *mut _) {
panic!("Call to lifecycle_msgs__msg__Transition__init() failed");
}
msg
}
}
}
impl rosidl_runtime_rs::SequenceAlloc for Transition {
fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
unsafe { lifecycle_msgs__msg__Transition__Sequence__init(seq as *mut _, size) }
}
fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
unsafe { lifecycle_msgs__msg__Transition__Sequence__fini(seq as *mut _) }
}
fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
unsafe { lifecycle_msgs__msg__Transition__Sequence__copy(in_seq, out_seq as *mut _) }
}
}
impl rosidl_runtime_rs::Message for Transition {
type RmwMsg = Self;
fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}
impl rosidl_runtime_rs::RmwMessage for Transition where Self: Sized {
const TYPE_NAME: &'static str = "lifecycle_msgs/msg/Transition";
fn get_type_support() -> *const std::ffi::c_void {
unsafe { rosidl_typesupport_c__get_message_type_support_handle__lifecycle_msgs__msg__Transition() }
}
}
#[link(name = "lifecycle_msgs__rosidl_typesupport_c")]
extern "C" {
fn rosidl_typesupport_c__get_message_type_support_handle__lifecycle_msgs__msg__TransitionDescription() -> *const std::ffi::c_void;
}
#[link(name = "lifecycle_msgs__rosidl_generator_c")]
extern "C" {
fn lifecycle_msgs__msg__TransitionDescription__init(msg: *mut TransitionDescription) -> bool;
fn lifecycle_msgs__msg__TransitionDescription__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<TransitionDescription>, size: usize) -> bool;
fn lifecycle_msgs__msg__TransitionDescription__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<TransitionDescription>);
fn lifecycle_msgs__msg__TransitionDescription__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<TransitionDescription>, out_seq: *mut rosidl_runtime_rs::Sequence<TransitionDescription>) -> bool;
}
#[repr(C)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct TransitionDescription {
pub transition: crate::lifecycle_msgs::msg::rmw::Transition,
pub start_state: crate::lifecycle_msgs::msg::rmw::State,
pub goal_state: crate::lifecycle_msgs::msg::rmw::State,
}
impl Default for TransitionDescription {
fn default() -> Self {
unsafe {
let mut msg = std::mem::zeroed();
if !lifecycle_msgs__msg__TransitionDescription__init(&mut msg as *mut _) {
panic!("Call to lifecycle_msgs__msg__TransitionDescription__init() failed");
}
msg
}
}
}
impl rosidl_runtime_rs::SequenceAlloc for TransitionDescription {
fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
unsafe { lifecycle_msgs__msg__TransitionDescription__Sequence__init(seq as *mut _, size) }
}
fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
unsafe { lifecycle_msgs__msg__TransitionDescription__Sequence__fini(seq as *mut _) }
}
fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
unsafe { lifecycle_msgs__msg__TransitionDescription__Sequence__copy(in_seq, out_seq as *mut _) }
}
}
impl rosidl_runtime_rs::Message for TransitionDescription {
type RmwMsg = Self;
fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}
impl rosidl_runtime_rs::RmwMessage for TransitionDescription where Self: Sized {
const TYPE_NAME: &'static str = "lifecycle_msgs/msg/TransitionDescription";
fn get_type_support() -> *const std::ffi::c_void {
unsafe { rosidl_typesupport_c__get_message_type_support_handle__lifecycle_msgs__msg__TransitionDescription() }
}
}
#[link(name = "lifecycle_msgs__rosidl_typesupport_c")]
extern "C" {
fn rosidl_typesupport_c__get_message_type_support_handle__lifecycle_msgs__msg__TransitionEvent() -> *const std::ffi::c_void;
}
#[link(name = "lifecycle_msgs__rosidl_generator_c")]
extern "C" {
fn lifecycle_msgs__msg__TransitionEvent__init(msg: *mut TransitionEvent) -> bool;
fn lifecycle_msgs__msg__TransitionEvent__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<TransitionEvent>, size: usize) -> bool;
fn lifecycle_msgs__msg__TransitionEvent__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<TransitionEvent>);
fn lifecycle_msgs__msg__TransitionEvent__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<TransitionEvent>, out_seq: *mut rosidl_runtime_rs::Sequence<TransitionEvent>) -> bool;
}
#[repr(C)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct TransitionEvent {
pub timestamp: u64,
pub transition: crate::lifecycle_msgs::msg::rmw::Transition,
pub start_state: crate::lifecycle_msgs::msg::rmw::State,
pub goal_state: crate::lifecycle_msgs::msg::rmw::State,
}
impl Default for TransitionEvent {
fn default() -> Self {
unsafe {
let mut msg = std::mem::zeroed();
if !lifecycle_msgs__msg__TransitionEvent__init(&mut msg as *mut _) {
panic!("Call to lifecycle_msgs__msg__TransitionEvent__init() failed");
}
msg
}
}
}
impl rosidl_runtime_rs::SequenceAlloc for TransitionEvent {
fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
unsafe { lifecycle_msgs__msg__TransitionEvent__Sequence__init(seq as *mut _, size) }
}
fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
unsafe { lifecycle_msgs__msg__TransitionEvent__Sequence__fini(seq as *mut _) }
}
fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
unsafe { lifecycle_msgs__msg__TransitionEvent__Sequence__copy(in_seq, out_seq as *mut _) }
}
}
impl rosidl_runtime_rs::Message for TransitionEvent {
type RmwMsg = Self;
fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}
impl rosidl_runtime_rs::RmwMessage for TransitionEvent where Self: Sized {
const TYPE_NAME: &'static str = "lifecycle_msgs/msg/TransitionEvent";
fn get_type_support() -> *const std::ffi::c_void {
unsafe { rosidl_typesupport_c__get_message_type_support_handle__lifecycle_msgs__msg__TransitionEvent() }
}
}
}
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct State {
pub id: u8,
pub label: std::string::String,
}
impl State {
pub const PRIMARY_STATE_UNKNOWN: u8 = 0;
pub const PRIMARY_STATE_UNCONFIGURED: u8 = 1;
pub const PRIMARY_STATE_INACTIVE: u8 = 2;
pub const PRIMARY_STATE_ACTIVE: u8 = 3;
pub const PRIMARY_STATE_FINALIZED: u8 = 4;
pub const TRANSITION_STATE_CONFIGURING: u8 = 10;
pub const TRANSITION_STATE_CLEANINGUP: u8 = 11;
pub const TRANSITION_STATE_SHUTTINGDOWN: u8 = 12;
pub const TRANSITION_STATE_ACTIVATING: u8 = 13;
pub const TRANSITION_STATE_DEACTIVATING: u8 = 14;
pub const TRANSITION_STATE_ERRORPROCESSING: u8 = 15;
}
impl Default for State {
fn default() -> Self {
<Self as rosidl_runtime_rs::Message>::from_rmw_message(crate::lifecycle_msgs::msg::rmw::State::default())
}
}
impl rosidl_runtime_rs::Message for State {
type RmwMsg = crate::lifecycle_msgs::msg::rmw::State;
fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> {
match msg_cow {
std::borrow::Cow::Owned(msg) => std::borrow::Cow::Owned(Self::RmwMsg {
id: msg.id,
label: msg.label.as_str().into(),
}),
std::borrow::Cow::Borrowed(msg) => std::borrow::Cow::Owned(Self::RmwMsg {
id: msg.id,
label: msg.label.as_str().into(),
})
}
}
fn from_rmw_message(msg: Self::RmwMsg) -> Self {
Self {
id: msg.id,
label: msg.label.to_string(),
}
}
}
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct Transition {
pub id: u8,
pub label: std::string::String,
}
impl Transition {
pub const TRANSITION_CREATE: u8 = 0;
pub const TRANSITION_CONFIGURE: u8 = 1;
pub const TRANSITION_CLEANUP: u8 = 2;
pub const TRANSITION_ACTIVATE: u8 = 3;
pub const TRANSITION_DEACTIVATE: u8 = 4;
pub const TRANSITION_UNCONFIGURED_SHUTDOWN: u8 = 5;
pub const TRANSITION_INACTIVE_SHUTDOWN: u8 = 6;
pub const TRANSITION_ACTIVE_SHUTDOWN: u8 = 7;
pub const TRANSITION_DESTROY: u8 = 8;
pub const TRANSITION_ON_CONFIGURE_SUCCESS: u8 = 10;
pub const TRANSITION_ON_CONFIGURE_FAILURE: u8 = 11;
pub const TRANSITION_ON_CONFIGURE_ERROR: u8 = 12;
pub const TRANSITION_ON_CLEANUP_SUCCESS: u8 = 20;
pub const TRANSITION_ON_CLEANUP_FAILURE: u8 = 21;
pub const TRANSITION_ON_CLEANUP_ERROR: u8 = 22;
pub const TRANSITION_ON_ACTIVATE_SUCCESS: u8 = 30;
pub const TRANSITION_ON_ACTIVATE_FAILURE: u8 = 31;
pub const TRANSITION_ON_ACTIVATE_ERROR: u8 = 32;
pub const TRANSITION_ON_DEACTIVATE_SUCCESS: u8 = 40;
pub const TRANSITION_ON_DEACTIVATE_FAILURE: u8 = 41;
pub const TRANSITION_ON_DEACTIVATE_ERROR: u8 = 42;
pub const TRANSITION_ON_SHUTDOWN_SUCCESS: u8 = 50;
pub const TRANSITION_ON_SHUTDOWN_FAILURE: u8 = 51;
pub const TRANSITION_ON_SHUTDOWN_ERROR: u8 = 52;
pub const TRANSITION_ON_ERROR_SUCCESS: u8 = 60;
pub const TRANSITION_ON_ERROR_FAILURE: u8 = 61;
pub const TRANSITION_ON_ERROR_ERROR: u8 = 62;
pub const TRANSITION_CALLBACK_SUCCESS: u8 = 97;
pub const TRANSITION_CALLBACK_FAILURE: u8 = 98;
pub const TRANSITION_CALLBACK_ERROR: u8 = 99;
}
impl Default for Transition {
fn default() -> Self {
<Self as rosidl_runtime_rs::Message>::from_rmw_message(crate::lifecycle_msgs::msg::rmw::Transition::default())
}
}
impl rosidl_runtime_rs::Message for Transition {
type RmwMsg = crate::lifecycle_msgs::msg::rmw::Transition;
fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> {
match msg_cow {
std::borrow::Cow::Owned(msg) => std::borrow::Cow::Owned(Self::RmwMsg {
id: msg.id,
label: msg.label.as_str().into(),
}),
std::borrow::Cow::Borrowed(msg) => std::borrow::Cow::Owned(Self::RmwMsg {
id: msg.id,
label: msg.label.as_str().into(),
})
}
}
fn from_rmw_message(msg: Self::RmwMsg) -> Self {
Self {
id: msg.id,
label: msg.label.to_string(),
}
}
}
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct TransitionDescription {
pub transition: crate::lifecycle_msgs::msg::Transition,
pub start_state: crate::lifecycle_msgs::msg::State,
pub goal_state: crate::lifecycle_msgs::msg::State,
}
impl Default for TransitionDescription {
fn default() -> Self {
<Self as rosidl_runtime_rs::Message>::from_rmw_message(crate::lifecycle_msgs::msg::rmw::TransitionDescription::default())
}
}
impl rosidl_runtime_rs::Message for TransitionDescription {
type RmwMsg = crate::lifecycle_msgs::msg::rmw::TransitionDescription;
fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> {
match msg_cow {
std::borrow::Cow::Owned(msg) => std::borrow::Cow::Owned(Self::RmwMsg {
transition: crate::lifecycle_msgs::msg::Transition::into_rmw_message(std::borrow::Cow::Owned(msg.transition)).into_owned(),
start_state: crate::lifecycle_msgs::msg::State::into_rmw_message(std::borrow::Cow::Owned(msg.start_state)).into_owned(),
goal_state: crate::lifecycle_msgs::msg::State::into_rmw_message(std::borrow::Cow::Owned(msg.goal_state)).into_owned(),
}),
std::borrow::Cow::Borrowed(msg) => std::borrow::Cow::Owned(Self::RmwMsg {
transition: crate::lifecycle_msgs::msg::Transition::into_rmw_message(std::borrow::Cow::Borrowed(&msg.transition)).into_owned(),
start_state: crate::lifecycle_msgs::msg::State::into_rmw_message(std::borrow::Cow::Borrowed(&msg.start_state)).into_owned(),
goal_state: crate::lifecycle_msgs::msg::State::into_rmw_message(std::borrow::Cow::Borrowed(&msg.goal_state)).into_owned(),
})
}
}
fn from_rmw_message(msg: Self::RmwMsg) -> Self {
Self {
transition: crate::lifecycle_msgs::msg::Transition::from_rmw_message(msg.transition),
start_state: crate::lifecycle_msgs::msg::State::from_rmw_message(msg.start_state),
goal_state: crate::lifecycle_msgs::msg::State::from_rmw_message(msg.goal_state),
}
}
}
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct TransitionEvent {
pub timestamp: u64,
pub transition: crate::lifecycle_msgs::msg::Transition,
pub start_state: crate::lifecycle_msgs::msg::State,
pub goal_state: crate::lifecycle_msgs::msg::State,
}
impl Default for TransitionEvent {
fn default() -> Self {
<Self as rosidl_runtime_rs::Message>::from_rmw_message(crate::lifecycle_msgs::msg::rmw::TransitionEvent::default())
}
}
impl rosidl_runtime_rs::Message for TransitionEvent {
type RmwMsg = crate::lifecycle_msgs::msg::rmw::TransitionEvent;
fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> {
match msg_cow {
std::borrow::Cow::Owned(msg) => std::borrow::Cow::Owned(Self::RmwMsg {
timestamp: msg.timestamp,
transition: crate::lifecycle_msgs::msg::Transition::into_rmw_message(std::borrow::Cow::Owned(msg.transition)).into_owned(),
start_state: crate::lifecycle_msgs::msg::State::into_rmw_message(std::borrow::Cow::Owned(msg.start_state)).into_owned(),
goal_state: crate::lifecycle_msgs::msg::State::into_rmw_message(std::borrow::Cow::Owned(msg.goal_state)).into_owned(),
}),
std::borrow::Cow::Borrowed(msg) => std::borrow::Cow::Owned(Self::RmwMsg {
timestamp: msg.timestamp,
transition: crate::lifecycle_msgs::msg::Transition::into_rmw_message(std::borrow::Cow::Borrowed(&msg.transition)).into_owned(),
start_state: crate::lifecycle_msgs::msg::State::into_rmw_message(std::borrow::Cow::Borrowed(&msg.start_state)).into_owned(),
goal_state: crate::lifecycle_msgs::msg::State::into_rmw_message(std::borrow::Cow::Borrowed(&msg.goal_state)).into_owned(),
})
}
}
fn from_rmw_message(msg: Self::RmwMsg) -> Self {
Self {
timestamp: msg.timestamp,
transition: crate::lifecycle_msgs::msg::Transition::from_rmw_message(msg.transition),
start_state: crate::lifecycle_msgs::msg::State::from_rmw_message(msg.start_state),
goal_state: crate::lifecycle_msgs::msg::State::from_rmw_message(msg.goal_state),
}
}
}