pocket_prover-derive

Crates.iopocket_prover-derive
lib.rspocket_prover-derive
version0.8.0
sourcesrc
created_at2018-02-25 06:02:36.225436
updated_at2022-10-07 21:41:53.371464
descriptionDerive procedural macros for `pocket_prover`.
homepagehttps://github.com/advancedresearch/pocket_prover
repositoryhttps://github.com/advancedresearch/pocket_prover.git
max_upload_size
id52748
size7,951
Sven Nilsen (bvssvni)

documentation

https://docs.rs/pocket_prover-derive

README

pocket_prover-derive

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,
}
Commit count: 177

cargo fmt