An open API service indexing awesome lists of open source software.

https://github.com/kije/construction

Con-struct-ion - Marcos for generating struct definitions
https://github.com/kije/construction

Last synced: 8 months ago
JSON representation

Con-struct-ion - Marcos for generating struct definitions

Awesome Lists containing this project

README

          

# construction
Con-struct-ion - Marcos for generating struct definitions

WORK IN PROGRESS...

## Idea
Allow generation/definition of structs.

```rust
struct A {
foo: String,
bar: Option
}

#[construction(extend=A)]
struct B;

// generates:
struct B {
foo: String,
bar: Option
}

#[construction(extend=A)]
struct C {
baz: u64
}

// generates:
struct C {
foo: String,
bar: Option,
baz: u64
}

#[construction(extend=A, omit=[foo])]
struct D {
baz: u64
}

// generates:
struct D {
bar: Option,
baz: u64
}
```