cw-storage-macro

Crates.iocw-storage-macro
lib.rscw-storage-macro
version2.0.0
sourcesrc
created_at2022-07-28 12:00:51.040942
updated_at2024-03-14 16:08:52.26339
descriptionMacro helpers for storage-plus
homepagehttps://cosmwasm.com
repositoryhttps://github.com/CosmWasm/cw-storage-plus
max_upload_size
id634363
size3,848
Mauro Lacy (maurolacy)

documentation

https://docs.cosmwasm.com

README

CW-Storage-Plus: Macro helpers for storage-plus

Procedural macros helper for interacting with cw-storage-plus and cosmwasm-storage.

Current features

Auto generate an IndexList impl for your indexes struct.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
struct TestStruct {
    id: u64,
    id2: u32,
    addr: Addr,
}

#[index_list(TestStruct)] // <- Add this line right here.
struct TestIndexes<'a> {
    id: MultiIndex<'a, u32, TestStruct, u64>,
    addr: UniqueIndex<'a, Addr, TestStruct, String>,
}
Commit count: 1102

cargo fmt