rclrs

Enum RclReturnCode

Source
#[repr(i32)]
pub enum RclReturnCode {
Show 38 variants Ok = 0, Error = 1, Timeout = 2, Unsupported = 3, BadAlloc = 10, InvalidArgument = 11, AlreadyInit = 100, NotInit = 101, MismatchedRmwId = 102, TopicNameInvalid = 103, ServiceNameInvalid = 104, UnknownSubstitution = 105, AlreadyShutdown = 106, NodeInvalid = 200, NodeInvalidName = 201, NodeInvalidNamespace = 202, NodeNameNonexistent = 203, PublisherInvalid = 300, SubscriptionInvalid = 400, SubscriptionTakeFailed = 401, ClientInvalid = 500, ClientTakeFailed = 501, ServiceInvalid = 600, ServiceTakeFailed = 601, TimerInvalid = 800, TimerCanceled = 801, WaitSetInvalid = 900, WaitSetEmpty = 901, WaitSetFull = 902, InvalidRemapRule = 1_001, WrongLexeme = 1_002, InvalidRosArgs = 1_003, InvalidParamRule = 1_010, InvalidLogLevelRule = 1_020, EventInvalid = 2_000, EventTakeFailed = 2_001, LifecycleStateRegistered = 3_000, LifecycleStateNotRegistered = 3_001,
}
Expand description

Return codes of rcl functions.

This type corresponds to rcl_ret_t. Most of these return codes should never occur in an rclrs application, since they are returned when rcl functions are used wrongly..

Variants§

§

Ok = 0

Success

§

Error = 1

Unspecified error

§

Timeout = 2

Timeout occurred

§

Unsupported = 3

Unsupported return code

§

BadAlloc = 10

Failed to allocate memory

§

InvalidArgument = 11

Argument to function was invalid

§

AlreadyInit = 100

rcl_init() already called

§

NotInit = 101

rcl_init() not yet called

§

MismatchedRmwId = 102

Mismatched rmw identifier

§

TopicNameInvalid = 103

Topic name does not pass validation

§

ServiceNameInvalid = 104

Service name (same as topic name) does not pass validation

§

UnknownSubstitution = 105

Topic name substitution is unknown

§

AlreadyShutdown = 106

rcl_shutdown() already called

§

NodeInvalid = 200

Invalid rcl_node_t given

§

NodeInvalidName = 201

Invalid node name

§

NodeInvalidNamespace = 202

Invalid node namespace

§

NodeNameNonexistent = 203

Failed to find node name

§

PublisherInvalid = 300

Invalid rcl_publisher_t given

§

SubscriptionInvalid = 400

Invalid rcl_subscription_t given

§

SubscriptionTakeFailed = 401

Failed to take a message from the subscription

§

ClientInvalid = 500

Invalid rcl_client_t given

§

ClientTakeFailed = 501

Failed to take a response from the client

§

ServiceInvalid = 600

Invalid rcl_service_t given

§

ServiceTakeFailed = 601

Failed to take a request from the service

§

TimerInvalid = 800

Invalid rcl_timer_t given

§

TimerCanceled = 801

Given timer was canceled

§

WaitSetInvalid = 900

Invalid rcl_wait_set_t given

§

WaitSetEmpty = 901

Given rcl_wait_set_t is empty

§

WaitSetFull = 902

Given rcl_wait_set_t is full

§

InvalidRemapRule = 1_001

Argument is not a valid remap rule

§

WrongLexeme = 1_002

Expected one type of lexeme but got another

§

InvalidRosArgs = 1_003

Found invalid ROS argument while parsing

§

InvalidParamRule = 1_010

Argument is not a valid parameter rule

§

InvalidLogLevelRule = 1_020

Argument is not a valid log level rule

§

EventInvalid = 2_000

Invalid rcl_event_t given

§

EventTakeFailed = 2_001

Failed to take an event from the event handle

§

LifecycleStateRegistered = 3_000

rcl_lifecycle state registered

§

LifecycleStateNotRegistered = 3_001

rcl_lifecycle state not registered

Trait Implementations§

Source§

impl Debug for RclReturnCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for RclReturnCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for RclReturnCode

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for RclReturnCode

Source§

fn eq(&self, other: &RclReturnCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<i32> for RclReturnCode

Source§

type Error = i32

The type returned in the event of a conversion error.
Source§

fn try_from(value: i32) -> Result<Self, i32>

Performs the conversion.
Source§

impl Eq for RclReturnCode

Source§

impl StructuralPartialEq for RclReturnCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.