uor-foundation 0.1.3

UOR Foundation — typed Rust traits for the complete ontology. Import and implement.
Documentation
// @generated by uor-crate from uor-ontology — do not edit manually

//! UOR Foundation — typed Rust traits for the complete ontology.
//!
//! Version: 0.1.3
//!
//! This crate exports every ontology class as a trait, every property as a
//! method, and every named individual as a constant. Implementations (like
//! PRISM) import these traits and provide concrete types.
//!
//! # Primitives
//!
//! All traits are generic over [`Primitives`], a type family that lets
//! implementors choose their own concrete representations for XSD types.
//!
//! ```rust,ignore
//! struct MyImpl;
//! impl uor_foundation::Primitives for MyImpl {
//!     type String = str;
//!     type Integer = i64;
//!     type NonNegativeInteger = u64;
//!     type PositiveInteger = u64;
//!     type Decimal = f64;
//!     type Boolean = bool;
//! }
//! ```
//!
//! # Module Structure
//!
//! - [`kernel`] — Immutable foundation: addressing, schema, operations
//! - [`bridge`] — Kernel-computed, user-consumed: queries, resolution, partitions, proofs
//! - [`user`] — Runtime declarations: types, morphisms, state

#![no_std]

pub mod bridge;
pub mod enums;
pub mod kernel;
pub mod user;

pub use enums::*;

/// XSD primitive type family.
/// Implementors choose concrete representations for each XSD type.
/// PRISM might use `u64` for integers at Q0, `u128` at higher quantum
/// levels, or a bignum library. The foundation does not constrain this choice.
pub trait Primitives {
    /// String type (`xsd:string`). Use `str` for borrowed, `String` for owned.
    type String: ?Sized;
    /// Integer type (`xsd:integer`).
    type Integer;
    /// Non-negative integer type (`xsd:nonNegativeInteger`).
    type NonNegativeInteger;
    /// Positive integer type (`xsd:positiveInteger`).
    type PositiveInteger;
    /// Decimal type (`xsd:decimal`).
    type Decimal;
    /// Boolean type (`xsd:boolean`).
    type Boolean;
}