surrealdb-obj-derive

Crates.iosurrealdb-obj-derive
lib.rssurrealdb-obj-derive
version0.1.1
sourcesrc
created_at2022-11-12 01:55:05.579791
updated_at2022-11-14 13:06:06.76398
descriptiona derive from surrealdb-schema-derive
homepage
repositoryhttps://github.com/huang12zheng/surrealdb-schema-derive/
max_upload_size
id713244
size2,691
(huang12zheng)

documentation

README

  • please check impl/src/lib.rs

  • usage

#[derive(Debug, Clone)]
pub struct Relation {
    pub id: Thing,
    pub from: Thing,
    pub with: Thing,
}

impl TryFrom<surrealdb_obj_derive::SurrealValue> for Relation {}

ref to crate schema

or

#[derive(SurrealDbObject, Debug, Clone)]
pub struct Mobile {
    pub id: u64,
}
  • release
cargo install cargo-release
cargo release publish --workspace --registry crates-io --execute
cargo release push  --execute
# cargo publish --no-verify
Commit count: 14

cargo fmt