bitcoin-internals 0.5.0

Internal types and macros used by rust-bitcoin ecosystem
Documentation
1
2
3
4
5
6
7
8
9
//! Contains a wrapper for a function that implements `Debug`.
use core::fmt;

/// A wrapper for a function that implements `Debug`.
pub struct WrapDebug<F: Fn(&mut fmt::Formatter) -> fmt::Result>(pub F);

impl<F: Fn(&mut fmt::Formatter) -> fmt::Result> fmt::Debug for WrapDebug<F> {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { (self.0)(f) }
}