Trait OntologySchema
pub trait OntologySchema: 'static {
const KEY: &'static str;
// Provided method
fn validate(
_members: &BTreeSet<RawId>,
_boundary: &BTreeSet<RawId>,
) -> Result<(), Diagnostic> { ... }
}Description
Schema marker for one kind of Standard Ontology view.
Unlike the sealed crate::Entity trait, this trait is intentionally
open: third-party crates may define ontology schemas without changing the
Semantic Kernel. Keys are stable wire identifiers and should include a
version, for example eqiora.model/v1.
Required Associated Constants§
Provided Methods§
fn validate(
_members: &BTreeSet<RawId>,
_boundary: &BTreeSet<RawId>,
) -> Result<(), Diagnostic>
fn validate( _members: &BTreeSet<RawId>, _boundary: &BTreeSet<RawId>, ) -> Result<(), Diagnostic>
Validate invariants specific to this schema after common structural checks have passed.
The default accepts every structurally valid view, which is useful for third-party schemas whose constraints live in generated validators.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.