Expand description
This crate provides a derive macro for the TasmObject
trait.
Example usage:
#[derive(BFieldCodec, TasmObject)]
struct Foo<T: BFieldCodec> {
t_list: Vec<T>,
}
notes:
-
An implementation of
BFieldCodec
is required, else compilation will fail. It is recommended to deriveBFieldCodec
. -
If the target struct has a
where
clause with a trailing comma, compilation will fail.See also: https://github.com/TritonVM/tasm-lib/issues/91
Example: do not do this.
#[derive(BFieldCodec, TasmObject)]
struct Foo<T>
where
T: BFieldCodec, { … }
// ^
Derive Macros§
- Derives
TasmObject
for structs.