pub enum EncodedTerm {
Show 16 variants
DefaultGraph,
NamedNode {
iri_id: StrHash,
},
NumericalBlankNode {
id: [u8; 16],
},
SmallBlankNode(SmallString),
BigBlankNode {
id_id: StrHash,
},
SmallStringLiteral(SmallString),
BigStringLiteral {
value_id: StrHash,
},
SmallSmallLangStringLiteral {
value: SmallString,
language: SmallString,
},
SmallBigLangStringLiteral {
value: SmallString,
language_id: StrHash,
},
BigSmallLangStringLiteral {
value_id: StrHash,
language: SmallString,
},
BigBigLangStringLiteral {
value_id: StrHash,
language_id: StrHash,
},
SmallSmallTypedLiteral {
value: SmallString,
datatype: SmallString,
},
SmallBigTypedLiteral {
value: SmallString,
datatype_id: StrHash,
},
BigSmallTypedLiteral {
value_id: StrHash,
datatype: SmallString,
},
BigBigTypedLiteral {
value_id: StrHash,
datatype_id: StrHash,
},
QuotedTriple {
subject: Box<EncodedTerm>,
predicate: Box<EncodedTerm>,
object: Box<EncodedTerm>,
},
}Expand description
Encoded term representation for efficient storage
Variants§
DefaultGraph
Default graph (for quad-based stores)
NamedNode
Named node with hashed IRI
NumericalBlankNode
Blank node with numerical ID (16 bytes for uniqueness)
SmallBlankNode(SmallString)
Small blank node with inline string
BigBlankNode
Large blank node with hashed ID
SmallStringLiteral(SmallString)
Small string literal (inline)
BigStringLiteral
Large string literal (hashed)
SmallSmallLangStringLiteral
Small value, small language tag
SmallBigLangStringLiteral
Small value, large language tag
BigSmallLangStringLiteral
Large value, small language tag
BigBigLangStringLiteral
Large value, large language tag
SmallSmallTypedLiteral
Typed literal with small value and small datatype
SmallBigTypedLiteral
Typed literal with small value and hashed datatype
BigSmallTypedLiteral
Typed literal with hashed value and small datatype
BigBigTypedLiteral
Typed literal with hashed value and hashed datatype
QuotedTriple
Quoted triple (RDF-star)
Implementations§
Source§impl EncodedTerm
impl EncodedTerm
Sourcepub fn encode_named_node(node: &NamedNode) -> Self
pub fn encode_named_node(node: &NamedNode) -> Self
Encodes a named node
Sourcepub fn encode_named_node_ref(node: NamedNodeRef<'_>) -> Self
pub fn encode_named_node_ref(node: NamedNodeRef<'_>) -> Self
Encodes a named node reference
Sourcepub fn encode_blank_node(node: &BlankNode) -> Self
pub fn encode_blank_node(node: &BlankNode) -> Self
Encodes a blank node
Sourcepub fn encode_blank_node_ref(node: BlankNodeRef<'_>) -> Self
pub fn encode_blank_node_ref(node: BlankNodeRef<'_>) -> Self
Encodes a blank node reference
Sourcepub fn encode_literal(literal: &Literal) -> Self
pub fn encode_literal(literal: &Literal) -> Self
Encodes a literal
Sourcepub fn encode_literal_ref(literal: LiteralRef<'_>) -> Self
pub fn encode_literal_ref(literal: LiteralRef<'_>) -> Self
Encodes a literal reference
Sourcepub fn encode_variable(_variable: &Variable) -> Self
pub fn encode_variable(_variable: &Variable) -> Self
Encodes a variable (currently not supported in storage context)
Sourcepub fn encode_quoted_triple(quoted_triple: &QuotedTriple) -> Self
pub fn encode_quoted_triple(quoted_triple: &QuotedTriple) -> Self
Encodes a quoted triple (RDF-star)
Sourcepub fn encode_term(term: &Term) -> Self
pub fn encode_term(term: &Term) -> Self
Encodes any term
Sourcepub fn encode_term_ref(term: TermRef<'_>) -> Self
pub fn encode_term_ref(term: TermRef<'_>) -> Self
Encodes any term reference
Sourcepub fn type_discriminant(&self) -> u8
pub fn type_discriminant(&self) -> u8
Returns the type discriminant for sorting and indexing
Sourcepub fn is_named_node(&self) -> bool
pub fn is_named_node(&self) -> bool
Returns true if this is a named node
Sourcepub fn is_blank_node(&self) -> bool
pub fn is_blank_node(&self) -> bool
Returns true if this is a blank node
Sourcepub fn is_literal(&self) -> bool
pub fn is_literal(&self) -> bool
Returns true if this is a literal
Sourcepub fn is_quoted_triple(&self) -> bool
pub fn is_quoted_triple(&self) -> bool
Returns true if this is a quoted triple (RDF-star)
Trait Implementations§
Source§impl Clone for EncodedTerm
impl Clone for EncodedTerm
Source§fn clone(&self) -> EncodedTerm
fn clone(&self) -> EncodedTerm
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EncodedTerm
impl Debug for EncodedTerm
Source§impl<'de> Deserialize<'de> for EncodedTerm
impl<'de> Deserialize<'de> for EncodedTerm
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for EncodedTerm
impl Hash for EncodedTerm
Source§impl PartialEq for EncodedTerm
impl PartialEq for EncodedTerm
Source§impl Serialize for EncodedTerm
impl Serialize for EncodedTerm
impl Eq for EncodedTerm
impl StructuralPartialEq for EncodedTerm
Auto Trait Implementations§
impl Freeze for EncodedTerm
impl RefUnwindSafe for EncodedTerm
impl Send for EncodedTerm
impl Sync for EncodedTerm
impl Unpin for EncodedTerm
impl UnsafeUnpin for EncodedTerm
impl UnwindSafe for EncodedTerm
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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