starknet_api 0.11.0

Starknet Rust types related to computation and execution.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// Implements `From<bottom_type> for top_type` for all bottom_types. Assumes:
/// - `From<intermediate_type> for top_type` is implemented.
/// - `From<bottom_type> for intermediate_type` is implemented, for all bottom_types.
#[macro_export]
macro_rules! impl_from_through_intermediate {
    ($intermediate_type: ty, $top_type:ty, $($bottom_type:ty),+) => {
        $(
            impl From<$bottom_type> for $top_type {
                fn from(x: $bottom_type) -> Self {
                    Self::from(<$intermediate_type>::from(x))
                }
            }
        )+
    };
}