-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
Use structure types as in rust structures.
NewType as in new type idiom.
Match to serde ast style
// unit struct -> Style::Unit
struct A;
// new type struct -> Style::Newtype
struct B(u8);
// tuple struct -> Style::Tuple
struct C(u8, u16);
// struct (c-like) -> Style::Struct
struct D {
a: u8,
b: u16,
}
// enum
enum E {
A, // unit struct -> unit variant -> Style::Unit
B(u8), // new type struct/ tuple struct -> new type variant -> Style::Newtype
C(u8, u16), // tuple struct -> tple variant -> Style::Tuple
D { // struct (c-like) -> struct variant -> Style::Struct
a: u8,
b: u16
}
}Reactions are currently unavailable