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
pub fn new() -> Self
pub fn from_volume(_volume: &Q42Volume) -> Result<Self, Error>
pub fn resolve_semantic_term(&self, term: &str) -> Option<String>
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§fn clone(&self) -> Q42Context
fn clone(&self) -> Q42Context
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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
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>
§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§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.