Expand description
Unified error types for nros
This module provides comprehensive error types that align with rclrs patterns
while maintaining no_std compatibility for embedded systems.
§Error Types
NanoRosError- Main unified error typeRclReturnCode- RCL-compatible error codesErrorContext- Context information (topic, service, node names)NanoRosErrorFilter- Trait for filtering expected errorsTakeFailedAsNone- Trait for converting take failures toOption
§Example
use nros_core::{NanoRosError, RclReturnCode};
fn publish_message() -> Result<(), NanoRosError> {
Err(NanoRosError::timeout())
}
let result = publish_message();
assert!(result.unwrap_err().is_timeout());Structs§
- Nano
RosError - Main error type for nros operations
Enums§
- Error
Context - Context information for errors
- Nested
Error - Nested error for wrapping serialization/deserialization errors
- RclReturn
Code - RCL-compatible return codes
Traits§
- Nano
RosError Filter - A helper trait to handle common error filtering patterns
- Take
Failed AsNone - A helper trait to convert take failures to None