Procedural macros helper for interacting with cw-storage-plus
and cosmwasm-storage
.
Auto generate IndexList
impl for your indexes struct.
index_list_impl(T)
will generate impl IndexList<T>
for struct T
below the macro's call.
IndexList
, Index
imports from cw-storage-plus
are also required.
```rust
struct TestStruct { id: u64, id2: u32, addr: Addr, }
struct TestIndexes<'a> {
id: MultiIndex<'a, (U32Key, Vec
Auto generate PrimaryKey
and Prefixer
impl for owned and reference variants, as_bytes
and from_slice
impl.
StorageKey
will generate
impl PrimaryKey<'_> for T
impl<'a> PrimaryKey<'a> for &'a T
impl Prefixer<'_> for T
impl<'a> Prefixer<'a> for &'a T
pub fn as_bytes(&self) -> &[u8]
pub fn from_slice(b: &[u8]) -> T
for enum T
below the macro's call.
PrimaryKey
, Prefixer
imports from cw-storage-plus
are also required.
```rust
enum TestEnum { G, F, } ```r