inter-struct
inter-struct copied to clipboard
Struct wide configuration
The idea is to add some configuration options to the struct attributes.
This might look like this:
#[derive(InterStruct)]
#[merge("crate::Target", strict)]
pub struct Source {
pub normal: String,
pub optional: Option<String>,
}
For now these are the planned configuration flags:
- [ ]
strict
Enforces that all fields (unless ignored) are mapped to the target struct. A compiler error will be thrown if any fields cannot be found on the target struct.