Trait cgp_error::ErrorRaiser
source · pub trait ErrorRaiser<Context, E>where
Context: HasErrorType,{
// Required method
fn raise_error(e: E) -> Context::Error;
}Expand description
Used for injecting external error types into Self::Error.
As an example, if Context: CanRaiseError<ParseIntError>, then we would be
able to call Context::raise_error(err) for an error value
err: ParseIntError and get back
a Context::Error value.
Required Methods§
fn raise_error(e: E) -> Context::Error
Object Safety§
This trait is not object safe.
Implementors§
impl<Component, Context, E> ErrorRaiser<Context, E> for Componentwhere
Context: HasErrorType,
Component: DelegateComponent<ErrorRaiserComponent>,
Component::Delegate: ErrorRaiser<Context, E>,
Used for injecting external error types into Self::Error.
As an example, if Context: CanRaiseError<ParseIntError>, then we would be
able to call Context::raise_error(err) for an error value
err: ParseIntError and get back
a Context::Error value.