Trait gear_common::storage::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.

Object Safety§

This trait is not object safe.

Implementors§