ixa

Macro define_person_property

Source
macro_rules! define_person_property {
    ($person_property:ident, $value:ty, $initialize:expr) => { ... };
    ($person_property:ident, $value:ty) => { ... };
}
Expand description

Defines a person property with the following parameters:

  • $person_property: A name for the identifier type of the property
  • $value: The type of the property’s value
  • $initialize: (Optional) A function that takes a Context and PersonId and returns the initial value. If it is not defined, calling get_person_property on the property without explicitly setting a value first will panic.