pub struct TripleRef<'a> {
pub subject: TermRef<'a>,
pub predicate: TermRef<'a>,
pub object: TermRef<'a>,
}Expand description
Zero-copy triple reference for efficient operations
Fields§
§subject: TermRef<'a>§predicate: TermRef<'a>§object: TermRef<'a>Implementations§
Source§impl<'a> TripleRef<'a>
impl<'a> TripleRef<'a>
Sourcepub fn new(
subject: TermRef<'a>,
predicate: TermRef<'a>,
object: TermRef<'a>,
) -> Self
pub fn new( subject: TermRef<'a>, predicate: TermRef<'a>, object: TermRef<'a>, ) -> Self
Create a new triple reference
Sourcepub fn from_triple(triple: &'a Triple) -> Self
pub fn from_triple(triple: &'a Triple) -> Self
Create from an owned triple
§Quoted triples (RDF-star)
TermRef is a zero-copy, Copy view (&'a str payloads only), so it
has no owned-string variant available to hold a freshly serialized
quoted-triple description; a quoted subject/object is therefore
mapped to the same non-identifying "<<quoted-triple>>" placeholder
documented on crate::model::RdfTerm::as_str. Do not use the
TermRef produced for a quoted-triple component as an identity or
lookup key – distinct quoted triples are indistinguishable through
this path. Code that needs real quoted-triple identity (e.g.
OptimizedGraph’s own subject/object interning) serializes the
full << s p o >> content instead; see intern_subject/
intern_object.
Sourcepub fn to_owned(&self) -> Result<Triple, OxirsError>
pub fn to_owned(&self) -> Result<Triple, OxirsError>
Convert to an owned triple
Trait Implementations§
impl<'a> Copy for TripleRef<'a>
impl<'a> Eq for TripleRef<'a>
impl<'a> StructuralPartialEq for TripleRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for TripleRef<'a>
impl<'a> RefUnwindSafe for TripleRef<'a>
impl<'a> Send for TripleRef<'a>
impl<'a> Sync for TripleRef<'a>
impl<'a> Unpin for TripleRef<'a>
impl<'a> UnsafeUnpin for TripleRef<'a>
impl<'a> UnwindSafe for TripleRef<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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,
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