Macro has_fields::require_fields
source · require_fields!() { /* proc-macro */ }
Expand description
Check if given fields are Some(…) or not
If has missing fields, return a Err with the missing fields
If all fields are Some(…), return Ok(())
require_fields!(&form, "field1", "field2", "...")