pub struct BTreeGraph<R> { /* private fields */ }Expand description
BTree-based RDF graph.
Implementations§
Source§impl<R> BTreeGraph<R>
impl<R> BTreeGraph<R>
Sourcepub fn new() -> BTreeGraph<R>
pub fn new() -> BTreeGraph<R>
Creates a new empty graph.
Sourcepub fn resources(&self) -> Resources<'_, R> ⓘ
pub fn resources(&self) -> Resources<'_, R> ⓘ
Returns an iterator over the resources of the graph.
Sourcepub fn into_indexed(self) -> IndexedBTreeGraph<R>
pub fn into_indexed(self) -> IndexedBTreeGraph<R>
Indexes the triples to allow more operation on this graph, such as
pattern matching using the PatternMatchingGraph trait.
Source§impl<R> BTreeGraph<R>where
R: Ord,
impl<R> BTreeGraph<R>where
R: Ord,
Sourcepub fn contains_resource(&self, resource: &R) -> bool
pub fn contains_resource(&self, resource: &R) -> bool
Checks if the provided resource appears in any triple in the graph.
Sourcepub fn contains(&self, triple: Triple<&R>) -> bool
pub fn contains(&self, triple: Triple<&R>) -> bool
Checks if the provided triple is in the graph.
Trait Implementations§
Source§impl<R> Clone for BTreeGraph<R>where
R: Clone,
impl<R> Clone for BTreeGraph<R>where
R: Clone,
Source§fn clone(&self) -> BTreeGraph<R>
fn clone(&self) -> BTreeGraph<R>
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<R> Debug for BTreeGraph<R>where
R: Debug,
impl<R> Debug for BTreeGraph<R>where
R: Debug,
Source§impl<R> Default for BTreeGraph<R>
impl<R> Default for BTreeGraph<R>
Source§fn default() -> BTreeGraph<R>
fn default() -> BTreeGraph<R>
Returns the “default value” for a type. Read more
impl<R> Eq for BTreeGraph<R>where
R: Eq,
Source§impl<R> Extend<Triple<R>> for BTreeGraph<R>
impl<R> Extend<Triple<R>> for BTreeGraph<R>
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Triple<R>>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Triple<R>>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<R> FiniteGraph for BTreeGraph<R>
impl<R> FiniteGraph for BTreeGraph<R>
Source§fn triples(&self) -> <BTreeGraph<R> as FiniteGraph>::Triples<'_>
fn triples(&self) -> <BTreeGraph<R> as FiniteGraph>::Triples<'_>
Returns an iterator over the triples of the graph.
Source§fn triples_count(&self) -> usize
fn triples_count(&self) -> usize
Returns the number of triples in the graph.
Source§impl<R> From<BTreeGraph<R>> for IndexedBTreeGraph<R>
impl<R> From<BTreeGraph<R>> for IndexedBTreeGraph<R>
Source§fn from(value: BTreeGraph<R>) -> IndexedBTreeGraph<R>
fn from(value: BTreeGraph<R>) -> IndexedBTreeGraph<R>
Converts to this type from the input type.
Source§impl<R> FromIterator<Triple<R>> for BTreeGraph<R>
impl<R> FromIterator<Triple<R>> for BTreeGraph<R>
Source§fn from_iter<T>(iter: T) -> BTreeGraph<R>where
T: IntoIterator<Item = Triple<R>>,
fn from_iter<T>(iter: T) -> BTreeGraph<R>where
T: IntoIterator<Item = Triple<R>>,
Creates a value from an iterator. Read more
Source§impl<R> GraphMut for BTreeGraph<R>
impl<R> GraphMut for BTreeGraph<R>
Source§impl<R> Hash for BTreeGraph<R>where
R: Hash,
impl<R> Hash for BTreeGraph<R>where
R: Hash,
Source§impl<'a, R> IntoIterator for &'a BTreeGraph<R>
impl<'a, R> IntoIterator for &'a BTreeGraph<R>
Source§impl<R> IntoIterator for BTreeGraph<R>where
R: Clone,
impl<R> IntoIterator for BTreeGraph<R>where
R: Clone,
Source§impl<R> Ord for BTreeGraph<R>where
R: Ord,
impl<R> Ord for BTreeGraph<R>where
R: Ord,
Source§fn cmp(&self, other: &BTreeGraph<R>) -> Ordering
fn cmp(&self, other: &BTreeGraph<R>) -> Ordering
1.21.0 (const: unstable) · 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<R> PartialEq for BTreeGraph<R>where
R: PartialEq,
impl<R> PartialEq for BTreeGraph<R>where
R: PartialEq,
Source§fn eq(&self, other: &BTreeGraph<R>) -> bool
fn eq(&self, other: &BTreeGraph<R>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<R> PartialOrd for BTreeGraph<R>where
R: PartialOrd,
impl<R> PartialOrd for BTreeGraph<R>where
R: PartialOrd,
Source§impl<R: RdfDisplay> RdfDisplay for BTreeGraph<R>
impl<R: RdfDisplay> RdfDisplay for BTreeGraph<R>
Source§fn rdf_fmt(&self, f: &mut Formatter<'_>) -> Result
fn rdf_fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter.
Source§fn rdf_display(&self) -> RdfDisplayed<&Self>
fn rdf_display(&self) -> RdfDisplayed<&Self>
Prepare the value to be formatted as an RDF syntax element.
Source§impl<R> ResourceFiniteGraph for BTreeGraph<R>
impl<R> ResourceFiniteGraph for BTreeGraph<R>
Source§type GraphResources<'a> = Resources<'a, R>
where
R: 'a
type GraphResources<'a> = Resources<'a, R> where R: 'a
Resources iterator.
Source§fn graph_resources(
&self,
) -> <BTreeGraph<R> as ResourceFiniteGraph>::GraphResources<'_>
fn graph_resources( &self, ) -> <BTreeGraph<R> as ResourceFiniteGraph>::GraphResources<'_>
Returns an iterator over the distinct resources of the graph.
Source§fn graph_resource_count(&self) -> usize
fn graph_resource_count(&self) -> usize
Returns the number of distinct resources in the graph.
Auto Trait Implementations§
impl<R> Freeze for BTreeGraph<R>
impl<R> RefUnwindSafe for BTreeGraph<R>where
R: RefUnwindSafe,
impl<R> Send for BTreeGraph<R>where
R: Send,
impl<R> Sync for BTreeGraph<R>where
R: Sync,
impl<R> Unpin for BTreeGraph<R>where
R: Unpin,
impl<R> UnsafeUnpin for BTreeGraph<R>
impl<R> UnwindSafe for BTreeGraph<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<D> AsyncFiniteDataset for Dwhere
D: TryFiniteDataset,
impl<D> AsyncFiniteDataset for Dwhere
D: TryFiniteDataset,
Source§type AsyncQuads<'a> = Iter<<D as TryFiniteDataset>::TryQuads<'a>>
where
D: 'a
type AsyncQuads<'a> = Iter<<D as TryFiniteDataset>::TryQuads<'a>> where D: 'a
Asynchronous fallible quads stream.
Source§async fn async_quads(
&self,
) -> Result<<D as AsyncFiniteDataset>::AsyncQuads<'_>, <D as TryDataset>::Error>
async fn async_quads( &self, ) -> Result<<D as AsyncFiniteDataset>::AsyncQuads<'_>, <D as TryDataset>::Error>
Returns a stream over the quads of the dataset.
Source§impl<D> AsyncFiniteGraph for Dwhere
D: TryFiniteGraph,
impl<D> AsyncFiniteGraph for Dwhere
D: TryFiniteGraph,
Source§type AsyncTriples<'a> = Iter<<D as TryFiniteGraph>::TryTriples<'a>>
where
D: 'a
type AsyncTriples<'a> = Iter<<D as TryFiniteGraph>::TryTriples<'a>> where D: 'a
Asynchronous fallible triples stream.
Source§async fn async_triples(
&self,
) -> Result<<D as AsyncFiniteGraph>::AsyncTriples<'_>, <D as TryGraph>::Error>
async fn async_triples( &self, ) -> Result<<D as AsyncFiniteGraph>::AsyncTriples<'_>, <D as TryGraph>::Error>
Returns a stream over the triples of the graph.
Source§impl<D> AsyncGraphMut for Dwhere
D: TryGraphMut,
impl<D> AsyncGraphMut for Dwhere
D: TryGraphMut,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<G> FiniteDataset for Gwhere
G: FiniteGraph,
impl<G> FiniteDataset for Gwhere
G: FiniteGraph,
Source§type Quads<'a> = TriplesIntoQuads<<G as FiniteGraph>::Triples<'a>, &'a <G as Graph>::Resource>
where
G: 'a
type Quads<'a> = TriplesIntoQuads<<G as FiniteGraph>::Triples<'a>, &'a <G as Graph>::Resource> where G: 'a
Quads iterator.
Source§fn quads(&self) -> <G as FiniteDataset>::Quads<'_>
fn quads(&self) -> <G as FiniteDataset>::Quads<'_>
Returns an iterator over the quads of the dataset.
Source§fn quads_count(&self) -> usize
fn quads_count(&self) -> usize
Returns the number of quads in the dataset.
Source§impl<G> NamedGraphFiniteDataset for Gwhere
G: Graph,
impl<G> NamedGraphFiniteDataset for Gwhere
G: Graph,
Source§fn named_graphs(&self) -> <G as NamedGraphFiniteDataset>::NamedGraphs<'_>
fn named_graphs(&self) -> <G as NamedGraphFiniteDataset>::NamedGraphs<'_>
Returns an iterator over the distinct named graphs of the dataset.
Source§fn named_graph_count(&self) -> usize
fn named_graph_count(&self) -> usize
Returns the number of distinct named graphs in the dataset.
Source§impl<G> ResourceFiniteDataset for Gwhere
G: ResourceFiniteGraph,
impl<G> ResourceFiniteDataset for Gwhere
G: ResourceFiniteGraph,
Source§type Resources<'a> = <G as ResourceFiniteGraph>::GraphResources<'a>
where
G: 'a
type Resources<'a> = <G as ResourceFiniteGraph>::GraphResources<'a> where G: 'a
Resources iterator.
Source§fn resources(&self) -> <G as ResourceFiniteDataset>::Resources<'_>
fn resources(&self) -> <G as ResourceFiniteDataset>::Resources<'_>
Returns an iterator over the distinct resources of the dataset.
Source§fn resource_count(&self) -> usize
fn resource_count(&self) -> usize
Returns the number of distinct resources in the dataset.