[][src]Crate megadex_derive


A procedural macro for generating routines for storing, retrieving, and indexing structs

Structs that Derive Megadex get routines to create a data store, put, get delete and find_by_fields

All structs must have either an id field, or a member that is tagged with #[id]

If a field is tagged with #[indexed] then it will be able to be used to retrieve the struct using a generated find_by_<member> function

use megadex_derive::Megadex;
use megadex_rkv::{Db, MegadexDb, MegadexDbError};
use serde_derive::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Megadex)]
pub struct Foo {
    id: String,
    foo: String,

fn main() {

Derive Macros