MCPcopy Create free account
hub / github.com/apache/avro-rs / regex

Method regex

avro/src/validator.rs:140–145  ·  view source on GitHub ↗

The regex used to validate the schema namespace. The default implementation uses the Avro specified regex.

(&self)

Source from the content-addressed store, hash-verified

138 ///
139 /// The default implementation uses the Avro specified regex.
140 fn regex(&self) -> &'static Regex {
141 static NAMESPACE_ONCE: OnceLock<Regex> = OnceLock::new();
142 NAMESPACE_ONCE.get_or_init(|| {
143 Regex::new(r"^([A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*)?$").unwrap()
144 })
145 }
146
147 /// Validates a schema namespace.
148 ///

Callers

nothing calls this directly

Implementers 2

validator.rsavro/src/validator.rs
validators.rsavro/tests/validators.rs

Calls

no outgoing calls

Tested by

no test coverage detected