@@ -12,7 +12,12 @@ pub use action_server::*;
1212use crate :: { log_error, rcl_bindings:: * , vendor:: builtin_interfaces:: msg:: Time , DropGuard } ;
1313use std:: fmt;
1414
15+ #[ cfg( feature = "serde" ) ]
16+ use serde:: { Deserialize , Serialize } ;
17+
1518/// A unique identifier for a goal request.
19+ #[ cfg_attr( feature = "serde" , derive( Deserialize , Serialize ) ) ]
20+ #[ cfg_attr( feature = "serde" , serde( transparent) ) ]
1621#[ derive( Copy , Clone , Debug , Default , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
1722pub struct GoalUuid ( pub [ u8 ; RCL_ACTION_UUID_SIZE ] ) ;
1823
@@ -148,6 +153,7 @@ impl MultiCancelResponse {
148153}
149154
150155/// Values defined by `action_msgs/msg/GoalStatus`
156+ #[ cfg_attr( feature = "serde" , derive( Deserialize , Serialize ) ) ]
151157#[ repr( i8 ) ]
152158#[ derive( Debug , Clone , Copy , Hash , PartialEq , Eq , PartialOrd , Ord ) ]
153159pub enum GoalStatusCode {
@@ -192,6 +198,7 @@ impl From<i8> for GoalStatusCode {
192198
193199/// A status update for a goal. Includes the status code, the goal uuid, and the
194200/// timestamp of when the status was set by the action server.
201+ #[ cfg_attr( feature = "serde" , derive( Deserialize , Serialize ) ) ]
195202#[ derive( Debug , Clone , PartialEq , PartialOrd ) ]
196203pub struct GoalStatus {
197204 /// The status code describing what status was set by the action server.
0 commit comments