d3-derive

Crates.iod3-derive
lib.rsd3-derive
version0.1.3
sourcesrc
created_at2020-10-17 22:05:32.414896
updated_at2020-11-13 08:00:50.485321
descriptionA framework for server development -- the derive macro
homepagehttps://github.com/BruceBrown/d3
repositoryhttps://github.com/BruceBrown/d3/tree/master/d3-derive
max_upload_size
id301672
size17,858
Bruce (BruceBrown)

documentation

https://docs.rs/d3-derive

README

Rust Derive Macro for D3 -- A Framework for Server Development

Build Status Test Status License Cargo Documentation Rust 1.47+

Custom derive for automatically implementing the MachineImpl trait for an enum, tranforming it into a d3 instruction set. d3-derive is a companion to d3-core and d3-components. Combined, they form a framework for server development.

Usage

Add this to your Cargo.toml:

[dependencies]
d3-derive = "0.1.3"

Example

#[macro_use]
extern crate d3_derive;

#[derive(MachineImpl)]
pub enum Foo {
    Bar,
    Baz {
        name: String,
    },
    Baa (u32),
}
Commit count: 39

cargo fmt