mshc-macro-shared 0.1.1

Shared macro source for 'mshc' and 'mshc-derive'
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[macro_export]
macro_rules! req_field {
    (named $data:ident, $field:expr) => {
        $crate::maybe_field!(named $data, $field)
            .expect(&format!("No '{}' field found in struct layout", $field))
    };

    ($data:ident, $field:literal) => {
        $crate::maybe_field!($data, $field)
            .expect(&format!("No '{}' field found in struct layout", $field))
    };
}