Trait apache_avro::validator::SchemaNameValidator
source · pub trait SchemaNameValidator: Send + Sync {
// Required method
fn validate(&self, schema_name: &str) -> AvroResult<(String, Namespace)>;
// Provided method
fn regex(&self) -> &'static Regex { ... }
}
Expand description
A trait that validates schema names. To register a custom one use set_schema_name_validator.
Required Methods§
sourcefn validate(&self, schema_name: &str) -> AvroResult<(String, Namespace)>
fn validate(&self, schema_name: &str) -> AvroResult<(String, Namespace)>
Validates the schema name and returns the name and the optional namespace, or Error::InvalidSchemaName if it is invalid.