pub trait RecordFieldNameValidator: Send + Sync {
// Required method
fn validate(&self, name: &str) -> AvroResult<()>;
// Provided method
fn regex(&self) -> &'static Regex { ... }
}Expand description
A trait that validates record field names. To register a custom one use set_record_field_name_validator.
Required Methods§
Sourcefn validate(&self, name: &str) -> AvroResult<()>
fn validate(&self, name: &str) -> AvroResult<()>
Validates the record field’s names and returns nothing (unit), or Details::FieldName if it is invalid.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".