#[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 (rclc_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
(rclc_cancel_response_t vs rclc_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 more