FallibleCallback

Trait FallibleCallback 

Source
pub trait FallibleCallback<T, R = ()> {
    type Error;

    // Required method
    fn call(arg: &T) -> Result<R, Self::Error>;
}
Expand description

Represents callback action for cases (&T) -> Result<R, E>, where R is () by default and E is associated type Error.

Required Associated Types§

Source

type Error

Returning error in callback’s Err case.

Required Methods§

Source

fn call(arg: &T) -> Result<R, Self::Error>

Triggers the callback’s logic.

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.

Implementors§