Skip to main content

validate_reserved_metadata_key

Function validate_reserved_metadata_key 

Source
pub fn validate_reserved_metadata_key(key: &str) -> Result<(), ValidationError>
Expand description

Reject a caller-supplied reserved identity/discriminator key (mem / id / type) as metadata — the create-path half of the reservation, deliberate and typed (ValidationError::ReadOnlyField) rather than the incidental UNKNOWN_METADATA_FIELD a reserved key would otherwise trip (no installable schema can declare one). Timestamp fields are NOT checked here: create’s posture for init_timestamp / auto_timestamp fields is stamp-and-proceed with an IGNORED_READONLY_FIELD warning, deliberately.