Skip to main content

replace_entity_field

Attribute Macro replace_entity_field 

Source
#[replace_entity_field]
Expand description

Replaces decoded entity field values with custom logic.

This low-level form receives the current field as &FieldValue and returns Option<FieldValue>. Return Some to replace the value; return None to leave it unchanged or let later generated checks continue.

The handler can receive ctx: &Context, event: EntityEvents, entity: &Entity, field_name: &str, and value: &FieldValue in any order.