kutil 0.0.5

Kutil utilities collection
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::receiver::*;

//
// FailFastErrorReceiver
//

/// [ErrorReceiver] that fails on the first given error.
pub struct FailFastErrorReceiver;

impl<ErrorT> ErrorReceiver<ErrorT> for FailFastErrorReceiver {
    fn give_error(&mut self, error: ErrorT) -> Result<(), ErrorT> {
        Err(error)
    }
}