Validates a schema namespace. Should return [`Details::InvalidNamespace`] if it is invalid.
(&self, namespace: &str)
| 148 | /// |
| 149 | /// Should return [`Details::InvalidNamespace`] if it is invalid. |
| 150 | fn validate(&self, namespace: &str) -> AvroResult<()> { |
| 151 | let regex = SchemaNamespaceValidator::regex(self); |
| 152 | if !regex.is_match(namespace) { |
| 153 | Err(Details::InvalidNamespace(namespace.to_string(), regex.as_str()).into()) |
| 154 | } else { |
| 155 | Ok(()) |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | impl SchemaNamespaceValidator for SpecificationValidator {} |
nothing calls this directly
no outgoing calls
no test coverage detected