pub struct TripleRef<'a>(/* private fields */);Implementations§
Source§impl<'a> TripleRef<'a>
impl<'a> TripleRef<'a>
pub fn new( subject: &'a Term, predicate: &'a Term, object: &'a Term, ) -> Result<TripleRef<'a>, TripleError>
Sourcepub unsafe fn new_unchecked(
subject: &'a Term,
predicate: &'a Term,
object: &'a Term,
) -> TripleRef<'a>
pub unsafe fn new_unchecked( subject: &'a Term, predicate: &'a Term, object: &'a Term, ) -> TripleRef<'a>
§Safety
The passed in values must yield a correct RDF triple
pub fn subject(&self) -> &Term
pub fn predicate(&self) -> &Term
pub fn object(&self) -> &Term
pub fn spo(&self) -> (&Term, &Term, &Term)
pub fn ground(&self) -> bool
pub fn to_triple(self) -> Arc<Triple>
Trait Implementations§
Source§impl GraphView for &TripleRef<'_>
impl GraphView for &TripleRef<'_>
type Stream = Once<Ready<Result<Arc<Triple>, GraphError>>>
type Filter<FilterType: TripleFilter + Send + Sync + Unpin + Clone> = DefaultFilter<&TripleRef<'_>, FilterType>
type Matches<'matches> = DefaultMatches<'matches, &TripleRef<'_>>
type Describe<'describe> = DefaultDescribe<'describe, &TripleRef<'_>>
type SubjectStream<'stream> = Map<<<&TripleRef<'_> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(Result<Arc<Triple>, GraphError>) -> Result<Arc<Term>, GraphError>>
type PredicateStream<'stream> = Map<<<&TripleRef<'_> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(Result<Arc<Triple>, GraphError>) -> Result<Arc<Term>, GraphError>>
type ObjectStream<'stream> = Map<<<&TripleRef<'_> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(Result<Arc<Triple>, GraphError>) -> Result<Arc<Term>, GraphError>>
type CBD = CBD<&TripleRef<'_>>
async fn stream( self, ) -> Result<<&TripleRef<'_> as GraphView>::Stream, GraphError>
async fn filter<FilterType>( self, filter: FilterType, ) -> Result<<&TripleRef<'_> as GraphView>::Filter<FilterType>, GraphError>
async fn matches<'matches>( self, subject: Option<&'matches Term>, predicate: Option<&'matches Term>, object: Option<&'matches Term>, limit: Option<usize>, ) -> Result<<&TripleRef<'_> as GraphView>::Matches<'matches>, GraphError>
async fn describe( self, subject: Option<&Term>, limit: Option<usize>, ) -> Result<<&TripleRef<'_> as GraphView>::Describe<'_>, GraphError>
async fn subjects<'stream>( self, arg1: Option<&'stream Term>, arg2: Option<&'stream Term>, limit: Option<usize>, ) -> Result<<&TripleRef<'_> as GraphView>::SubjectStream<'stream>, GraphError>
async fn predicates<'stream>( self, arg1: Option<&'stream Term>, arg2: Option<&'stream Term>, limit: Option<usize>, ) -> Result<<&TripleRef<'_> as GraphView>::PredicateStream<'stream>, GraphError>
async fn objects<'stream>( self, arg1: Option<&'stream Term>, arg2: Option<&'stream Term>, limit: Option<usize>, ) -> Result<<&TripleRef<'_> as GraphView>::ObjectStream<'stream>, GraphError>
Source§fn cbd(
self,
subject: &Term,
) -> impl Future<Output = Result<<&TripleRef<'_> as GraphView>::CBD, GraphError>>
fn cbd( self, subject: &Term, ) -> impl Future<Output = Result<<&TripleRef<'_> as GraphView>::CBD, GraphError>>
Example Read more
fn subject( self, predicate: Option<&Term>, object: Option<&Term>, ) -> impl Future<Output = Result<Option<Arc<Term>>, GraphError>> + Send
fn predicate( self, subject: Option<&Term>, object: Option<&Term>, ) -> impl Future<Output = Result<Option<Arc<Term>>, GraphError>> + Send
fn object( self, subject: Option<&Term>, predicate: Option<&Term>, ) -> impl Future<Output = Result<Option<Arc<Term>>, GraphError>> + Send
fn contains( self, triple: TripleRef<'_>, ) -> impl Future<Output = Result<bool, GraphError>> + Send
Source§fn ground(self) -> impl Future<Output = Result<bool, GraphError>> + Send
fn ground(self) -> impl Future<Output = Result<bool, GraphError>> + Send
Checks whether graph is ground as defined by
RDF Concepts and Abstract Syntax Read more
fn default_triple_size_hint() -> usize
fn default_buf_size_hint() -> usize
fn triple_size_hint(&self) -> usize
fn buf_size_hint(&self) -> usize
Source§impl Ord for TripleRef<'_>
impl Ord for TripleRef<'_>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd<Triple> for TripleRef<'_>
impl PartialOrd<Triple> for TripleRef<'_>
Source§impl PartialOrd<TripleRef<'_>> for Triple
impl PartialOrd<TripleRef<'_>> for Triple
Source§impl PartialOrd for TripleRef<'_>
impl PartialOrd for TripleRef<'_>
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> UnwindSafe for TripleRef<'a>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
Compare self to
key and return true if they are equal.