Crate stronghold_derive
source · [−]Expand description
Proc macros for Stronghold.
Derive Macros
A version of the derive Debug
trait that blocks parsing the data inside of a struct or enum.
Use GuardDebug
to block reading and inspection of a data structure via the Debug
trait.
Implements the VariantPermission
for struct/ unions with PermissionValue(1).
For enums, it creates an analogous new enum VariantPermission
by assigning different PermissionValue
for each variant. The permission value is the “index” in the enum as
exponent for the power of 2, thus from top to bottom 1, 2, 4, 8…
Additionally, it implements Borrow
from the new original enum to the new enum, to satisfy the trait bounds of
StrongholdP2p
.