macro_rules! save_fields {
($me:ident, $context:ident, [$($field:ident),+ $(,)?]) => { ... };
($context:ident, [$($field:ident),+ $(,)?]) => { ... };
}Expand description
Build a Record from a list of fields.
Two forms are supported:
save_fields!(self, context, [a, b, c])reads each field asself.a,self.b, etc. Use this fromSave::savefor plain structs.save_fields!(context, [a, b, c])reads each field from a local binding of the same name. Use this inside enum match arms where the variant’s payload has already been destructured into local bindings. Those bindings are assumed to be references (which is automatic when matching against&self); for an owned local, take a reference explicitly first.