pub trait SchemaProvider: Send + Sync {
// Required methods
fn id(&self) -> &str;
fn name(&self) -> &str;
fn schema_for(&self, path: &Path) -> Option<SchemaContent>;
}Expand description
A type that can provide a JSON Schema for a given file path.
Implement this trait for built-in providers and register them via
SchemaRegistry::register. Extensions use the RegisterSchema
host-request to register schemas dynamically at runtime.
Required Methods§
Sourcefn schema_for(&self, path: &Path) -> Option<SchemaContent>
fn schema_for(&self, path: &Path) -> Option<SchemaContent>
Returns the SchemaContent for path if this provider covers it,
or None otherwise.