Skip to content

Con-struct-ion - Marcos for generating struct definitions

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

kije/construction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

construction

Con-struct-ion - Marcos for generating struct definitions

WORK IN PROGRESS...

Idea

Allow generation/definition of structs.

struct A {
    foo: String,
    bar: Option<String>
}

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

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

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

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

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

// generates:
struct D {
    bar: Option<String>,
    baz: u64
}

About

Con-struct-ion - Marcos for generating struct definitions

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages