[][src]Trait roperator::error::RoperatorError

pub trait RoperatorError: Error + Send + 'static + Any {
    fn as_any(&self) -> &dyn Any;
}

Trait for errors that maybe be used by roperator or handlers. This just sets up the trait bounds that are required, since we'll typicaly only expose rather opaque boxed error types, and they will need to be sent between threads.

Required methods

fn as_any(&self) -> &dyn Any

Loading content...

Methods

impl dyn RoperatorError[src]

pub fn as_type<T: RoperatorError>(&self) -> Option<&T>[src]

convenience function for downcasting the error to a concrete type

pub fn is_type<T: RoperatorError>(&self) -> bool[src]

convenience function for checking whether the error is of the given concrete type. If is_type::<MyType>() returns true, then calling as_type::<MyType>() will return Some.

Implementors

impl<T> RoperatorError for T where
    T: Error + Send + 'static + Any
[src]

Loading content...