#[repr(i8)]pub enum CancelReturnCode {
Ok = 0,
Rejected = 1,
UnknownGoal = 2,
GoalTerminated = 3,
}Expand description
action_msgs/srv/CancelGoal RPC return codes.
This is the whole-request outcome the server writes into the
CancelGoal reply — “did the cancel RPC succeed”, not “is this one goal
being cancelled”. These codes are the wire contract, so the discriminants
are fixed by action_msgs.
Issue 0796 — this type used to be called CancelResponse, which is the
name C (nros_cancel_response_t) and C++ (nros::CancelResponse) both
use for the PER-GOAL accept/reject decision. Two concepts under one name is
how CancelResponse ended up being the type a per-goal cancel callback
returned: CancelResponse::Ok meant “cancel this goal”, which reads as an
RPC status and is not one. C already named them apart
(nros_cancel_response_t vs nros_cancel_return_code_t); the Rust names
now follow it.
Variants§
Ok = 0
No error, goal(s) will be canceled
Rejected = 1
Goal was rejected (not cancelable or doesn’t exist)
UnknownGoal = 2
Unknown goal ID
GoalTerminated = 3
Goal is already in a terminal state
Implementations§
Source§impl CancelReturnCode
impl CancelReturnCode
Sourcepub fn from_i8(value: i8) -> Option<CancelReturnCode>
pub fn from_i8(value: i8) -> Option<CancelReturnCode>
Convert from i8 value
Trait Implementations§
Source§impl Clone for CancelReturnCode
impl Clone for CancelReturnCode
Source§fn clone(&self) -> CancelReturnCode
fn clone(&self) -> CancelReturnCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CancelReturnCode
Source§impl Debug for CancelReturnCode
impl Debug for CancelReturnCode
Source§impl Default for CancelReturnCode
impl Default for CancelReturnCode
Source§fn default() -> CancelReturnCode
fn default() -> CancelReturnCode
Source§impl Deserialize for CancelReturnCode
impl Deserialize for CancelReturnCode
Source§fn deserialize(
reader: &mut CdrReader<'_>,
) -> Result<CancelReturnCode, DeserError>
fn deserialize( reader: &mut CdrReader<'_>, ) -> Result<CancelReturnCode, DeserError>
impl Eq for CancelReturnCode
Source§impl PartialEq for CancelReturnCode
impl PartialEq for CancelReturnCode
Source§fn eq(&self, other: &CancelReturnCode) -> bool
fn eq(&self, other: &CancelReturnCode) -> bool
self and other values to be equal, and is used by ==.