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

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

A trait that validates schema namespaces. To register a custom one use set_schema_namespace_validator.

Required Methods§

source

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

Validates the schema namespace or Error::InvalidNamespace if it is invalid.

Provided Methods§

source

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

Returns the regex used to validate the schema namespace according to the Avro specification.

Implementors§