Skip to main content

EnumSymbolNameValidator

Trait EnumSymbolNameValidator 

Source
pub trait EnumSymbolNameValidator: Send + Sync {
    // Required method
    fn validate(&self, name: &str) -> AvroResult<()>;

    // Provided method
    fn regex(&self) -> &'static Regex { ... }
}
Expand description

A trait that validates enum symbol names. To register a custom one use set_enum_symbol_name_validator.

Required Methods§

Source

fn validate(&self, name: &str) -> AvroResult<()>

Validates the symbols of an Enum schema name and returns nothing (unit), or Details::EnumSymbolName if it is invalid.

Provided Methods§

Source

fn regex(&self) -> &'static Regex

Returns the regex used to validate the symbols of enum schema according to the Avro specification.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§