macro_rules! derive_deftly_template_NetdocSigned {
({ $($driver:tt)* } [$($aoptions:tt)*] ($($future:tt)*) $($tpassthrough:tt)*) => { ... };
($($wrong:tt)*) => { ... };
}
Available on crate feature
parse2
only.Expand description
Derive FooSigned
from Foo
Apply this derive to the main body struct Foo
.
Usually, provide suitable .verify_...
methods.
The body and signature types have to implement Clone
and Debug
.
§Top-level attributes:
-
#[deftly(netdoc(signature = "TYPE"))]
: Type of the signature(s) section.TYPE must implement
NetdocParseable
, withis_intro_item_keyword
reporting every signature keyword. Normally this is achieved with#[derive_deftly(NetdocParseable)] #[deftly(netdoc(signatures))]
.
§Generated struct
pub struct FooSigned {
body: Foo,
pub signatures: FooSignatures,
}
impl NetdocParseable for FooSigned { .. }
impl NetdocSigned for FooSigned { .. }
This is a derive_deftly
template. Do not invoke it directly.
To use it, write: #[derive(Deftly)] #[derive_deftly(NetdocSigned)]
.