pub struct SemanticSchema {
pub id: SymbolId,
pub name: String,
pub description: String,
pub functions: BTreeMap<SymbolId, SemanticFunction>,
pub types: BTreeMap<SymbolId, SemanticType>,
pub symbol_table: SymbolTable,
}Expand description
Semantic schema with fully resolved types and deterministic ordering
Fields§
§id: SymbolId§name: String§description: String§functions: BTreeMap<SymbolId, SemanticFunction>Functions ordered by SymbolId for deterministic output
types: BTreeMap<SymbolId, SemanticType>All type definitions ordered by SymbolId
symbol_table: SymbolTableSymbol table for efficient lookups
Implementations§
Source§impl SemanticSchema
impl SemanticSchema
Sourcepub fn get_type_by_name(&self, name: &str) -> Option<&SemanticType>
pub fn get_type_by_name(&self, name: &str) -> Option<&SemanticType>
Look up a type by its name via the symbol table’s resolution cache. Falls back to linear scan if the name isn’t in the symbol table. Also checks original_name for lookups by pre-normalization qualified name.
Sourcepub fn get_type(&self, id: &SymbolId) -> Option<&SemanticType>
pub fn get_type(&self, id: &SymbolId) -> Option<&SemanticType>
Look up a type by SymbolId.
Sourcepub fn types(&self) -> impl Iterator<Item = &SemanticType>
pub fn types(&self) -> impl Iterator<Item = &SemanticType>
Iterate all types in deterministic order.
Sourcepub fn functions(&self) -> impl Iterator<Item = &SemanticFunction>
pub fn functions(&self) -> impl Iterator<Item = &SemanticFunction>
Iterate all functions in deterministic order.
Sourcepub fn type_names(&self) -> impl Iterator<Item = &str>
pub fn type_names(&self) -> impl Iterator<Item = &str>
Ordered type names (deterministic via BTreeMap).
Trait Implementations§
Source§impl Clone for SemanticSchema
impl Clone for SemanticSchema
Source§fn clone(&self) -> SemanticSchema
fn clone(&self) -> SemanticSchema
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SemanticSchema
impl Debug for SemanticSchema
Source§impl PartialEq for SemanticSchema
impl PartialEq for SemanticSchema
impl Eq for SemanticSchema
impl StructuralPartialEq for SemanticSchema
Auto Trait Implementations§
impl Freeze for SemanticSchema
impl RefUnwindSafe for SemanticSchema
impl Send for SemanticSchema
impl Sync for SemanticSchema
impl Unpin for SemanticSchema
impl UnsafeUnpin for SemanticSchema
impl UnwindSafe for SemanticSchema
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