pub struct Ontology {
pub version: String,
pub semantic_tags: Vec<SemanticTag>,
pub relationships: Vec<EntityRelationship>,
pub mappings: Vec<CrossProviderMapping>,
pub migration_paths: Vec<MigrationPath>,
pub capabilities: HashMap<String, Vec<String>>,
}Expand description
The complete ontology over all provider schemas.
AI agents can query this to:
- Discover what data is available across providers
- Understand field semantics and relationships
- Find equivalent fields across providers
- Plan data migrations and merges
Fields§
§version: StringVersion of the ontology specification
All known semantic tags (universal field concepts)
relationships: Vec<EntityRelationship>Entity type relationships
mappings: Vec<CrossProviderMapping>Cross-provider field mappings
migration_paths: Vec<MigrationPath>Known migration paths between schema versions
capabilities: HashMap<String, Vec<String>>Provider capability matrix (provider → set of capabilities)
Implementations§
Source§impl Ontology
impl Ontology
Sourcepub fn cross_provider_mappings(
&self,
source_schema: &str,
target_schema: &str,
) -> Vec<&CrossProviderMapping>
pub fn cross_provider_mappings( &self, source_schema: &str, target_schema: &str, ) -> Vec<&CrossProviderMapping>
Find all mappings between two schemas
Sourcepub fn find_by_semantic_tag(&self, tag: &str) -> Vec<&CrossProviderMapping>
pub fn find_by_semantic_tag(&self, tag: &str) -> Vec<&CrossProviderMapping>
Find all fields matching a semantic tag across all schemas
Sourcepub fn migration_path(&self, from: &str, to: &str) -> Option<&MigrationPath>
pub fn migration_path(&self, from: &str, to: &str) -> Option<&MigrationPath>
Get migration path between two schema versions
Sourcepub fn provider_capabilities(&self, provider: &str) -> Option<&Vec<String>>
pub fn provider_capabilities(&self, provider: &str) -> Option<&Vec<String>>
Get capabilities for a specific provider
Sourcepub fn entity_types(&self) -> Vec<&EntityType>
pub fn entity_types(&self) -> Vec<&EntityType>
Get all entity types used in the ontology
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Ontology
impl<'de> Deserialize<'de> for Ontology
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Ontology
impl RefUnwindSafe for Ontology
impl Send for Ontology
impl Sync for Ontology
impl Unpin for Ontology
impl UnsafeUnpin for Ontology
impl UnwindSafe for Ontology
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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