We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b40f96a commit 5ba2dadCopy full SHA for 5ba2dad
rclrs/src/error.rs
@@ -10,6 +10,14 @@ use crate::{rcl_bindings::*, DeclarationError};
10
#[derive(Debug, PartialEq, Eq)]
11
pub enum RclrsError {
12
/// An error originating in the `rcl` layer.
13
+ /// Example:
14
+ /// ```rust
15
+ /// let error: RclrsError = RclrsError::RclError { code: RclReturnCode::Timeout, msg: None };
16
+ /// match &error {
17
+ /// RclrsError::RclError { msg, .. } => assert_eq!(msg, &None),
18
+ /// _ => panic!("Unexpected error variant"),
19
+ /// }
20
+ /// ```
21
RclError {
22
/// The error code.
23
code: RclReturnCode,
0 commit comments