inference-engine 0.1.0-alpha.10

Native Rust inference foundation with checked RDF rule-profile compilation
Documentation
use super::EntailmentTerms;
use std::{future::Future, num::NonZeroU32};

/// Authoritative bounded access to an exact RDF IRI's spelling.
///
/// Share the immutable identity domain of structural access. Cache misses load
/// authoritative metadata or fail, never become a supported non-IRI. Unsupported
/// term extensions must fail. Standard IRIs must already be syntax-validated.
pub trait IriTermAccess: EntailmentTerms {
    /// Borrowed or shared metadata, without requiring a full string clone.
    type Iri<'a>: AsRef<str> + Send + Sync
    where
        Self: 'a;
    /// Return metadata only for this exact IRI; `None` means a known non-IRI.
    /// Enforce `maximum_bytes` before allocating owned metadata. Borrowing from
    /// either the immutable accessor or the supplied term is permitted.
    fn iri<'a>(
        &'a self,
        term: &'a Self::Term,
        maximum_bytes: NonZeroU32,
    ) -> impl Future<Output = Result<Option<Self::Iri<'a>>, Self::Error>> + Send;
}