pub trait SchemaNamespaceValidator: Send + Sync {
// Provided methods
fn regex(&self) -> &'static Regex { ... }
fn validate(&self, namespace: &str) -> AvroResult<()> { ... }
}Expand description
A trait that validates schema namespaces.
To register a custom one use set_schema_namespace_validator.
Provided Methods§
Sourcefn regex(&self) -> &'static Regex
fn regex(&self) -> &'static Regex
The regex used to validate the schema namespace.
The default implementation uses the Avro specified regex.
Sourcefn validate(&self, namespace: &str) -> AvroResult<()>
fn validate(&self, namespace: &str) -> AvroResult<()>
Validates a schema namespace.
Should return Details::InvalidNamespace if it is invalid.