pub fn validate_field_name(s: &str) -> Result<(), SchemaError>Expand description
Validate a field name against Anda DB’s naming rules.
A valid field name must:
- be non-empty,
- be at most 64 bytes long, and
- contain only ASCII lowercase letters (
a–z), digits (0–9) and underscores (_).
The _id field used as the document primary key is also a valid name.
§Arguments
s- The field name to validate
§Returns
Ok(())ifsis a legal field name.Err(SchemaError::FieldName)describing the first violation otherwise.