pub(crate) struct SchemaCatalog {
tables: Vec<&'static Table>,
tables_by_name: FastMap<&'static str, &'static Table>,
json_columns: FastMap<(McpTableId, &'static str), Value>,
}Fields§
§tables: Vec<&'static Table>§tables_by_name: FastMap<&'static str, &'static Table>§json_columns: FastMap<(McpTableId, &'static str), Value>Implementations§
Source§impl SchemaCatalog
impl SchemaCatalog
pub(crate) fn try_new() -> Result<Self, SchemaCatalogError>
fn from_descriptors( tables: impl IntoIterator<Item = &'static Table>, json_schemas: impl IntoIterator<Item = &'static JsonColumnSchema>, ) -> Result<Self, SchemaCatalogError>
pub(crate) fn table( &self, name: &str, ) -> Result<&'static Table, UnknownTableError>
pub(crate) fn list_tables_compact(&self) -> Vec<TableSummary>
pub(crate) fn get_schema( &self, table: Option<&str>, ) -> Result<Vec<TableSchema>, UnknownTableError>
pub(crate) fn build_tables_doc(&self, doc: Doc) -> Doc
fn table_schema(&self, table: &Table) -> TableSchema
fn json_schema_for(&self, table: McpTableId, column: &str) -> Option<Value>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaCatalog
impl RefUnwindSafe for SchemaCatalog
impl Send for SchemaCatalog
impl Sync for SchemaCatalog
impl Unpin for SchemaCatalog
impl UnsafeUnpin for SchemaCatalog
impl UnwindSafe for SchemaCatalog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more