electrs_client 0.2.9

A client for electrs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::fmt::Display;

pub trait MoreInfo {
    #[track_caller]
    fn err_log(self) -> Self;
}

impl<T, E: Display> MoreInfo for Result<T, E> {
    #[track_caller]
    fn err_log(self) -> Self {
        if let Err(ref e) = self {
            let loc = std::panic::Location::caller();
            println!("Error: {e} at file: {} line: {}", loc.file(), loc.line())
        }
        self
    }
}