Trait ErrorRecipient

Source
pub trait ErrorRecipient<ErrorT> {
    // Required method
    fn give(&mut self, error: impl Into<ErrorT>) -> Result<(), ErrorT>;
}
Expand description

A recipient of errors.

Required Methods§

Source

fn give(&mut self, error: impl Into<ErrorT>) -> Result<(), ErrorT>

Gives an error to the recipient.

Implementations may swallow the error (e.g. to accumulate it) or return it (fail-fast).

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<ErrorT> ErrorRecipient<ErrorT> for Errors<ErrorT>

Source§

impl<ErrorT> ErrorRecipient<ErrorT> for FailFastErrorRecipient