kudu 0.1.0

Library for interacting with Antelope blockchains
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14

/// Define the `From` conversion from an error type to another, where the first
/// is the source of the second. It will use the given `Snafu` context selector
/// to do so.
#[macro_export]
macro_rules! impl_auto_error_conversion {
    ($src:ty, $target:ty, $snafu:ident) => {
        impl From<$src> for $target {
            fn from(value: $src) -> $target {
                snafu::IntoError::into_error($snafu, value)
            }
        }
    };
}