pub struct Q42Context {
pub base_iri: String,
pub vocabulary: HashMap<String, String>,
}Expand description
Q42 Context for CBOR-LD processing
Fields§
§base_iri: String§vocabulary: HashMap<String, String>Implementations§
Source§impl Q42Context
impl Q42Context
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates the default JSON-LD context vocabulary (rdf/rdfs/owl/xsd/hcai/qualia).
Sourcepub fn from_volume(volume: &Q42Volume) -> Result<Self, Error>
pub fn from_volume(volume: &Q42Volume) -> Result<Self, Error>
Derives the semantic context from the volume’s embedded lexicon and manifest headers.
Sourcepub fn resolve_semantic_term(&self, term: &str) -> Option<String>
pub fn resolve_semantic_term(&self, term: &str) -> Option<String>
Resolves a vocabulary prefix to its base IRI.
Sourcepub fn context_hash(&self) -> u64
pub fn context_hash(&self) -> u64
Collapse the whole @context (base IRI + sorted vocabulary) into one deterministic
64-bit hash — the compact-context identity behind CBOR-LD-style compression.
Sourcepub fn expand_to_hash(&self, compact_iri: &str) -> u64
pub fn expand_to_hash(&self, compact_iri: &str) -> u64
Expand a compact IRI (prefix:suffix) against the vocabulary, then hash it into the
same 64-bit space. Unknown prefixes hash the term verbatim.
Trait Implementations§
Source§impl Clone for Q42Context
impl Clone for Q42Context
Source§impl Debug for Q42Context
impl Debug for Q42Context
Auto Trait Implementations§
impl Freeze for Q42Context
impl RefUnwindSafe for Q42Context
impl Send for Q42Context
impl Sync for Q42Context
impl Unpin for Q42Context
impl UnsafeUnpin for Q42Context
impl UnwindSafe for Q42Context
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.