For more control about which fields should be used by InterStruct or in which way they should be used, field attributes will be added.
The idea is to have serde-like configuration pattern. I.e.:
struct SomeStruct {
#[inter_struct(rename="something_else", unchecked)]
something: String,
}
For now several options are planned:
For more control about which fields should be used by InterStruct or in which way they should be used, field attributes will be added.
The idea is to have serde-like configuration pattern. I.e.:
For now several options are planned:
uncheckedInterStruct does some naive type checking by simply comparing the two types tokens.If the user is sure that the types are identical,
uncheckedwill disable all of InterStruct's type checking.rename="OtherName"This allows to map a field to a differently named field on the target struct.ignoreInterStruct will completely ignore this field.