Crates.io | pocket_prover-derive |
lib.rs | pocket_prover-derive |
version | 0.9.0 |
source | src |
created_at | 2018-02-25 06:02:36.225436 |
updated_at | 2024-09-20 12:29:57.745465 |
description | Derive procedural macros for `pocket_prover`. |
homepage | https://github.com/advancedresearch/pocket_prover |
repository | https://github.com/advancedresearch/pocket_prover.git |
max_upload_size | |
id | 52748 |
size | 8,136 |
Derive procedural macros for pocket_prover
.
Example:
#[macro_use]
extern crate pocket_prover_derive;
extern crate pocket_prover;
use pocket_prover::Construct;
#[derive(Construct)]
pub struct Foo {
pub a: u64,
pub b: u64,
}
Since pocket_prover
uses only u64
,
it is the only valid concrete field type.
The macro supports generic arguments, assuming that
the inner type implements Construct
:
#[derive(Construct)]
pub struct Bar<T = ()> {
pub foo: T,
pub a: u64,
pub b: u64,
}