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§
Sourcefn first_error(self) -> Result<(), RclrsError>
fn first_error(self) -> Result<(), RclrsError>
Get the first error available, or Ok(()) if there are no errors.
Sourcefn timeout_ok(self) -> Self
fn timeout_ok(self) -> Self
If the result was a timeout error, change it to Ok(())
.
Sourcefn take_failed_ok(self) -> Self
fn take_failed_ok(self) -> Self
If a subscription, service, or client take failed, change the result
to be Ok(())
.
Provided Methods§
Sourcefn ignore_non_errors(self) -> Selfwhere
Self: Sized,
fn ignore_non_errors(self) -> Selfwhere
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.