ton_lib 0.0.38

A collection of types and utilities for interacting with the TON network
1
2
3
4
5
6
7
8
9
10
#[macro_export]
macro_rules! unwrap_tl_response {
    ($result:expr, $variant:ident) => {
        match $result {
            TLResponse::$variant(inner) => Ok(inner),
            TLResponse::Error { code, message } => Err(TLError::TLClientResponseError { code, message }),
            _ => Err(TLError::TLClientWrongResponse(stringify!($variant).to_string(), format!("{:?}", $result))),
        }
    };
}