Trait GraphView

Source
pub trait GraphView: Sized + Send {
    type Stream: Send + Unpin + Stream<Item = Arc<Triple>>;
    type Filter<T: TripleFilter + Send + Sync + Unpin>: GraphView;
    type Matches<'g>: GraphView;
    type Describe<'g>: GraphView;
    type SubjectStream<'g>: Send + Unpin + Stream<Item = Arc<Term>>;
    type PredicateStream<'g>: Send + Unpin + Stream<Item = Arc<Term>>;
    type ObjectStream<'g>: Send + Unpin + Stream<Item = Arc<Term>>;

Show 15 methods // Required methods fn stream( self, ) -> impl Future<Output = Result<Self::Stream, GraphError>> + Send; fn filter<F>( self, filter: F, ) -> impl Future<Output = Result<Self::Filter<F>, GraphError>> + Send where F: TripleFilter + Send + Sync + Unpin; fn matches<'g>( self, subject: Option<&'g Term>, predicate: Option<&'g Term>, object: Option<&'g Term>, limit: Option<usize>, ) -> impl Future<Output = Result<Self::Matches<'g>, GraphError>> + Send; fn describe( self, subject: Option<&Term>, limit: Option<usize>, ) -> impl Future<Output = Result<Self::Describe<'_>, GraphError>> + Send; fn subjects<'g>( self, predicate: Option<&'g Term>, object: Option<&'g Term>, limit: Option<usize>, ) -> impl Future<Output = Result<Self::SubjectStream<'g>, GraphError>> + Send; fn predicates<'g>( self, subject: Option<&'g Term>, object: Option<&'g Term>, limit: Option<usize>, ) -> impl Future<Output = Result<Self::ObjectStream<'g>, GraphError>> + Send; fn objects<'g>( self, subject: Option<&'g Term>, predicate: Option<&'g Term>, limit: Option<usize>, ) -> impl Future<Output = Result<Self::ObjectStream<'g>, GraphError>> + Send; // Provided methods 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 { ... } fn default_triple_size_hint() -> usize { ... } fn default_buf_size_hint() -> usize { ... } fn triple_size_hint(&self) -> usize { ... } fn buf_size_hint(&self) -> usize { ... }
}

Required Associated Types§

Required Methods§

Source

fn stream(self) -> impl Future<Output = Result<Self::Stream, GraphError>> + Send

Source

fn filter<F>( self, filter: F, ) -> impl Future<Output = Result<Self::Filter<F>, GraphError>> + Send
where F: TripleFilter + Send + Sync + Unpin,

Source

fn matches<'g>( self, subject: Option<&'g Term>, predicate: Option<&'g Term>, object: Option<&'g Term>, limit: Option<usize>, ) -> impl Future<Output = Result<Self::Matches<'g>, GraphError>> + Send

Source

fn describe( self, subject: Option<&Term>, limit: Option<usize>, ) -> impl Future<Output = Result<Self::Describe<'_>, GraphError>> + Send

Source

fn subjects<'g>( self, predicate: Option<&'g Term>, object: Option<&'g Term>, limit: Option<usize>, ) -> impl Future<Output = Result<Self::SubjectStream<'g>, GraphError>> + Send

Source

fn predicates<'g>( self, subject: Option<&'g Term>, object: Option<&'g Term>, limit: Option<usize>, ) -> impl Future<Output = Result<Self::ObjectStream<'g>, GraphError>> + Send

Source

fn objects<'g>( self, subject: Option<&'g Term>, predicate: Option<&'g Term>, limit: Option<usize>, ) -> impl Future<Output = Result<Self::ObjectStream<'g>, GraphError>> + Send

Provided Methods§

Source

fn subject( self, predicate: Option<&Term>, object: Option<&Term>, ) -> impl Future<Output = Result<Option<Arc<Term>>, GraphError>> + Send

Source

fn predicate( self, subject: Option<&Term>, object: Option<&Term>, ) -> impl Future<Output = Result<Option<Arc<Term>>, GraphError>> + Send

Source

fn object( self, subject: Option<&Term>, predicate: Option<&Term>, ) -> impl Future<Output = Result<Option<Arc<Term>>, GraphError>> + Send

Source

fn contains( self, triple: TripleRef<'_>, ) -> impl Future<Output = Result<bool, GraphError>> + Send

Source

fn default_triple_size_hint() -> usize

Source

fn default_buf_size_hint() -> usize

Source

fn triple_size_hint(&self) -> usize

Source

fn buf_size_hint(&self) -> usize

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, T> GraphView for &'a GraphORMMeta<T>
where T: GraphORM + Unpin + Debug + PartialEq + Sync + Send + 'a,

Source§

type Stream = Pin<Box<dyn Stream<Item = Arc<Triple>> + Send + Unpin + 'a>>

Source§

type Filter<FilterType: TripleFilter + Send + Sync + Unpin> = DefaultFilter<&'a GraphORMMeta<T>, FilterType>

Source§

type Matches<'matches> = DefaultMatches<'matches, &'a GraphORMMeta<T>>

Source§

type Describe<'describe> = DefaultDescribe<'describe, &'a GraphORMMeta<T>>

Source§

type SubjectStream<'stream> = Map<<<&'a GraphORMMeta<T> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type PredicateStream<'stream> = Map<<<&'a GraphORMMeta<T> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type ObjectStream<'stream> = Map<<<&'a GraphORMMeta<T> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

async fn stream( self, ) -> Result<<&'a GraphORMMeta<T> as GraphView>::Stream, GraphError>

Source§

async fn filter<FilterType>( self, filter: FilterType, ) -> Result<<&'a GraphORMMeta<T> as GraphView>::Filter<FilterType>, GraphError>
where FilterType: TripleFilter + Send + Sync + Unpin,

Source§

async fn matches<'matches>( self, subject: Option<&'matches Term>, predicate: Option<&'matches Term>, object: Option<&'matches Term>, limit: Option<usize>, ) -> Result<<&'a GraphORMMeta<T> as GraphView>::Matches<'matches>, GraphError>

Source§

async fn describe( self, subject: Option<&Term>, limit: Option<usize>, ) -> Result<<&'a GraphORMMeta<T> as GraphView>::Describe<'_>, GraphError>

Source§

async fn subjects<'stream>( self, arg1: Option<&'stream Term>, arg2: Option<&'stream Term>, limit: Option<usize>, ) -> Result<<&'a GraphORMMeta<T> as GraphView>::ObjectStream<'stream>, GraphError>

Source§

async fn predicates<'stream>( self, arg1: Option<&'stream Term>, arg2: Option<&'stream Term>, limit: Option<usize>, ) -> Result<<&'a GraphORMMeta<T> as GraphView>::PredicateStream<'stream>, GraphError>

Source§

async fn objects<'stream>( self, arg1: Option<&'stream Term>, arg2: Option<&'stream Term>, limit: Option<usize>, ) -> Result<<&'a GraphORMMeta<T> as GraphView>::ObjectStream<'stream>, GraphError>

Implementors§

Source§

impl<'a, G> GraphView for DefaultDescribe<'a, G>
where G: GraphView,

Source§

type Stream = <DefaultMatches<'a, G> as GraphView>::Stream

Source§

type Filter<FilterType: TripleFilter + Send + Sync + Unpin> = DefaultFilter<DefaultDescribe<'a, G>, FilterType>

Source§

type Matches<'matches> = DefaultMatches<'matches, DefaultDescribe<'a, G>>

Source§

type Describe<'describe> = DefaultDescribe<'describe, DefaultDescribe<'a, G>>

Source§

type SubjectStream<'stream> = Map<<<DefaultDescribe<'a, G> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type PredicateStream<'stream> = Map<<<DefaultDescribe<'a, G> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type ObjectStream<'stream> = Map<<<DefaultDescribe<'a, G> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

impl<'g> GraphView for &'g ConfigurableGraphs

Source§

type Stream = Box<dyn Stream<Item = Arc<Triple>> + Send + Unpin + 'g>

Source§

type Filter<FilterType> = DefaultFilter<&'g ConfigurableGraphs, FilterType> where FilterType: TripleFilter + Send + Sync + Unpin

Source§

type Matches<'matches> = DefaultMatches<'matches, &'g ConfigurableGraphs>

Source§

type Describe<'describe> = DefaultDescribe<'describe, &'g ConfigurableGraphs>

Source§

type SubjectStream<'stream> = Map<<<&'g ConfigurableGraphs as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type PredicateStream<'stream> = Map<<<&'g ConfigurableGraphs as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type ObjectStream<'stream> = Map<<<&'g ConfigurableGraphs as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

impl<'g> GraphView for &'g SimpleGraph

Source§

type Stream = Iter<Cloned<Iter<'g, Arc<Triple>>>>

Source§

type Filter<FilterType> = DefaultFilter<&'g SimpleGraph, FilterType> where FilterType: TripleFilter + Send + Sync + Unpin

Source§

type Matches<'matches> = DefaultMatches<'matches, &'g SimpleGraph>

Source§

type Describe<'describe> = DefaultDescribe<'describe, &'g SimpleGraph>

Source§

type SubjectStream<'stream> = Map<<<&'g SimpleGraph as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type PredicateStream<'stream> = Map<<<&'g SimpleGraph as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type ObjectStream<'stream> = Map<<<&'g SimpleGraph as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

impl<'g> GraphView for &'g LocalFileSourceGraph

Source§

type Stream = TripleParser<BufReader<File>>

Source§

type Filter<FilterType> = DefaultFilter<&'g LocalFileSourceGraph, FilterType> where FilterType: TripleFilter + Send + Sync + Unpin

Source§

type Matches<'matches> = DefaultMatches<'matches, &'g LocalFileSourceGraph>

Source§

type Describe<'describe> = DefaultDescribe<'describe, &'g LocalFileSourceGraph>

Source§

type SubjectStream<'stream> = Map<<<&'g LocalFileSourceGraph as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type PredicateStream<'stream> = Map<<<&'g LocalFileSourceGraph as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type ObjectStream<'stream> = Map<<<&'g LocalFileSourceGraph as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

impl<'g> GraphView for &'g GraphStoreHttpSourceGraph

Source§

type Stream = Box<dyn Stream<Item = Arc<Triple>> + Send + Unpin + 'g>

Source§

type Filter<FilterType> = DefaultFilter<&'g GraphStoreHttpSourceGraph, FilterType> where FilterType: TripleFilter + Send + Sync + Unpin

Source§

type Matches<'matches> = DefaultMatches<'matches, &'g GraphStoreHttpSourceGraph>

Source§

type Describe<'describe> = DefaultDescribe<'describe, &'g GraphStoreHttpSourceGraph>

Source§

type SubjectStream<'stream> = Map<<<&'g GraphStoreHttpSourceGraph as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type PredicateStream<'stream> = Map<<<&'g GraphStoreHttpSourceGraph as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type ObjectStream<'stream> = Map<<<&'g GraphStoreHttpSourceGraph as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

impl<'g, G> GraphView for DefaultMatches<'g, G>
where G: GraphView,

Source§

type Stream = Map<TakeWhile<Enumerate<<<G as GraphView>::Filter<Box<dyn Fn(TripleRef<'_>) -> bool + Send + Sync + 'g>> as GraphView>::Stream>, Ready<bool>, Box<dyn Fn(&(usize, Arc<Triple>)) -> Ready<bool> + Send>>, fn(_: (usize, Arc<Triple>)) -> Arc<Triple>>

Source§

type Filter<FilterType: TripleFilter + Send + Sync + Unpin> = DefaultFilter<DefaultMatches<'g, G>, FilterType>

Source§

type Matches<'matches> = DefaultMatches<'matches, DefaultMatches<'g, G>>

Source§

type Describe<'describe> = DefaultDescribe<'describe, DefaultMatches<'g, G>>

Source§

type SubjectStream<'stream> = Map<<<DefaultMatches<'g, G> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type PredicateStream<'stream> = Map<<<DefaultMatches<'g, G> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type ObjectStream<'stream> = Map<<<DefaultMatches<'g, G> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

impl<G, T> GraphView for DefaultFilter<G, T>
where G: GraphView, T: TripleFilter + Send + Sync + Unpin,

Source§

type Stream = DefaultFilterStream<<G as GraphView>::Stream, T>

Source§

type Filter<FilterType: TripleFilter + Send + Sync + Unpin> = DefaultFilter<DefaultFilter<G, T>, FilterType>

Source§

type Matches<'matches> = DefaultMatches<'matches, DefaultFilter<G, T>>

Source§

type Describe<'describe> = DefaultDescribe<'describe, DefaultFilter<G, T>>

Source§

type SubjectStream<'stream> = Map<<<DefaultFilter<G, T> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type PredicateStream<'stream> = Map<<<DefaultFilter<G, T> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>

Source§

type ObjectStream<'stream> = Map<<<DefaultFilter<G, T> as GraphView>::Matches<'stream> as GraphView>::Stream, fn(_: Arc<Triple>) -> Arc<Term>>