Macro win_crypto_ng::blob

source ·
macro_rules! blob {
    (
        $(#[$wrapper_meta:meta])*
        enum $wrapper_ident: ident {},
        header: $header: ty,
        $(#[$outer:meta])*
        view: struct ref $tail_ident: ident {
            $(
                $(#[$meta:meta])*
                $field: ident [$($len: tt)*],
            )*
        }
    ) => { ... };
    (
        fields: $($prev: ident,)* ;
        $(#[$curr_meta:meta])*
        $curr: ident [$($curr_len: tt)*],
        $(
            $(#[$field_meta:meta])*
            $field: ident [$($field_len: tt)*],
        )*
    ) => { ... };
    (fields: $($prev: ident,)* ; ) => { ... };
    (size: $this: expr, $ident: ident) => { ... };
    (size: $this: expr, $expr: expr) => { ... };
}
Expand description

Defines a trait for accessing dynamic fields (byte slices) for structs that have a header of a known size which also defines the rest of the struct layout. Assumes a contiguous byte buffer.