EventError

Type Alias EventError 

Source
pub type EventError = Box<dyn Error + Send + Sync + 'static>;
Expand description

A generic Error wrapper allowing handlers to return errors to the Host caller.

Error handlers can define their own Error type which can be seamlessly converted into this type since it is a Box.

§Example

pub struct MyError{ /* ... */ };

fn try_something() -> Result<(), MyError> { /* ... */ }

fn my_handler(process: &mut ProcessState) -> Result<(), HandlerError> {
    // ...
    try_something()?;
    // ...
    Ok(())
}

Aliased Type§

pub struct EventError(/* private fields */);