rclrs

Trait RclrsErrorFilter

Source
pub trait RclrsErrorFilter {
    // Required methods
    fn first_error(self) -> Result<(), RclrsError>;
    fn timeout_ok(self) -> Self;
    fn take_failed_ok(self) -> Self;

    // Provided method
    fn ignore_non_errors(self) -> Self
       where Self: Sized { ... }
}
Expand description

A helper trait to disregard timeouts as not an error.

Required Methods§

Source

fn first_error(self) -> Result<(), RclrsError>

Get the first error available, or Ok(()) if there are no errors.

Source

fn timeout_ok(self) -> Self

If the result was a timeout error, change it to Ok(()).

Source

fn take_failed_ok(self) -> Self

If a subscription, service, or client take failed, change the result to be Ok(()).

Provided Methods§

Source

fn ignore_non_errors(self) -> Self
where Self: Sized,

Some error types just indicate an early termination but do not indicate that anything in the system has misbehaved. This filters out anything that is part of the normal operation of rcl.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl RclrsErrorFilter for Result<(), RclrsError>

Source§

impl RclrsErrorFilter for Vec<RclrsError>

Implementors§