Skip to main content

ErrorRaiser

Trait ErrorRaiser 

Source
pub trait ErrorRaiser<__Context__, SourceError>: IsProviderFor<ErrorRaiserComponent, __Context__, SourceError>
where __Context__: HasErrorType,
{ // Required method fn raise_error(error: SourceError) -> <__Context__ as HasErrorType>::Error; }
Expand description

The CanRaiseError trait is used to raise any concrete error type into an abstract error provided by HasErrorType.

Required Methods§

Source

fn raise_error(error: SourceError) -> <__Context__ as HasErrorType>::Error

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§

Source§

impl<Context> ErrorRaiser<Context, Infallible> for RaiseInfallible
where Context: HasErrorType,

Source§

impl<Context, E> ErrorRaiser<Context, E> for DebugError
where Context: CanRaiseError<String>, E: Debug,

Source§

impl<Context, E> ErrorRaiser<Context, E> for DisplayError
where Context: CanRaiseError<String>, E: Display,

Source§

impl<Context, E> ErrorRaiser<Context, E> for PanicOnError
where Context: HasErrorType, E: Debug,

Source§

impl<Context, E> ErrorRaiser<Context, E> for RaiseFrom
where Context: HasErrorType, <Context as HasErrorType>::Error: From<E>,

Source§

impl<Context, E> ErrorRaiser<Context, E> for ReturnError
where Context: HasErrorType<Error = E>,

Source§

impl<__Component__, __Context__, SourceError> ErrorRaiser<__Context__, SourceError> for __Component__
where __Context__: HasErrorType, __Component__: DelegateComponent<ErrorRaiserComponent> + IsProviderFor<ErrorRaiserComponent, __Context__, SourceError>, <__Component__ as DelegateComponent<ErrorRaiserComponent>>::Delegate: ErrorRaiser<__Context__, SourceError>,

The CanRaiseError trait is used to raise any concrete error type into an abstract error provided by HasErrorType.

Source§

impl<__Context__, SourceError> ErrorRaiser<__Context__, SourceError> for UseContext
where __Context__: HasErrorType + CanRaiseError<SourceError>,

The CanRaiseError trait is used to raise any concrete error type into an abstract error provided by HasErrorType.

Source§

impl<__Context__, SourceError, __Components__, __Delegate__> ErrorRaiser<__Context__, SourceError> for UseDelegate<__Components__>
where __Context__: HasErrorType, __Components__: DelegateComponent<SourceError, Delegate = __Delegate__>, __Delegate__: ErrorRaiser<__Context__, SourceError>,

The CanRaiseError trait is used to raise any concrete error type into an abstract error provided by HasErrorType.