macro_rules! derive_deftly_template_DirectorySignatureHashesAccu {
({ $($driver:tt)* } [$($aoptions:tt)*] ($($future:tt)*) $($tpassthrough:tt)*) => { ... };
($($wrong:tt)*) => { ... };
}Expand description
Ad-hoc derives for [DirectorySignatureHash] impls, avoiding copypasta bugs
§Input
pub enum DirectorySignatureHashAlgo- Unit variants
- Each variant with
#[deftly(hash_len = "N")]whereNis the digest length in bytes.
§Generated code
-
pub enum DirectorySignaturesHashesAccu, with each variant a 1-tuple containingOption<[u8; N]>. (These areNoneif this hash has not been computed yet.) -
DirectorySignaturesHashesAccu::parse_keyword_and_hash -
DirectorySignaturesHashesAccu::hash_slice_for_verification
This is a derive_deftly template. Do not invoke it directly.
To use it, write: #[derive(Deftly)] #[derive_deftly(DirectorySignatureHashesAccu)].