pub trait SchemaRegistry: Send + Sync {
// Required methods
fn get_schema(&self, name: &str) -> CatalogResult<TableSchema>;
fn register_schema(&mut self, name: impl Into<String>, schema: TableSchema);
fn schema_names(&self) -> Vec<String>;
}Expand description
A registry that maps logical schema names to TableSchema definitions.
Used by connectors (e.g., Kafka Avro/Protobuf topics) to resolve the Arrow schema for a data stream at runtime without hard-coding field lists.
Required Methods§
Sourcefn get_schema(&self, name: &str) -> CatalogResult<TableSchema>
fn get_schema(&self, name: &str) -> CatalogResult<TableSchema>
Look up a schema by name.
Sourcefn register_schema(&mut self, name: impl Into<String>, schema: TableSchema)
fn register_schema(&mut self, name: impl Into<String>, schema: TableSchema)
Register a schema under a name, replacing any existing entry.
Sourcefn schema_names(&self) -> Vec<String>
fn schema_names(&self) -> Vec<String>
Return all registered schema names.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".