chiark / gitweb /
client: wip code
[hippotat.git] / src / reporter.rs
1 // Copyright 2021 Ian Jackson and contributors to Hippotat
2 // SPDX-License-Identifier: AGPL-3.0-or-later
3 // There is NO WARRANTY.
4
5 use crate::prelude::*;
6
7 pub struct Reporter {
8 }
9
10 impl Reporter {
11   pub fn report<T>(r: Result<T,AE>) -> Option<T> {
12     match r {
13       Ok(t) => {
14         // xxx something something success
15         Some(t)
16       },
17       Err(e) => {
18         // xxx something something error
19         error!("ERRO {:?}R", e);
20         None
21       },
22     }
23   }
24 }