libmilkyway 0.1.0

libmilkyway is a part of milkyway project providing common protocols for communicating between MilkyWay modules
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
///
/// Macro to deserialize something and return error if it fails 
///
#[macro_export]
macro_rules! deserialize_and_check_errors {
    ($( $x:ty, /* Type to deserialize to */
        $y:expr /* What to deserialize */
    )*) => {
        let deserialized_temp_result = $x::from_deserialized($y);
        if deserialized_temp_result.is_err(){
            return Err(deserialized_temp_result.err().unwrap());
        }
    };
}