pub struct BTreeGraph<R> { /* private fields */ }Expand description
BTree-based RDF graph holding a uniform resource handle type R.
Implementations§
Source§impl<R> BTreeGraph<R>
impl<R> BTreeGraph<R>
Source§impl<R: Resource> BTreeGraph<R>
impl<R: Resource> BTreeGraph<R>
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: Resource + Ord> BTreeGraph<R>
impl<R: Resource + Ord> BTreeGraph<R>
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, &R, &R>) -> bool
pub fn contains(&self, triple: Triple<&R, &R, &R>) -> bool
Checks if the provided triple is in the graph.
Source§impl<R: Resource + Clone + Ord> BTreeGraph<R>
impl<R: Resource + Clone + Ord> BTreeGraph<R>
Sourcepub fn absorb<I: IntoIterator<Item = Triple<R, R, R>>>(&mut self, iter: I)
pub fn absorb<I: IntoIterator<Item = Triple<R, R, R>>>(&mut self, iter: I)
Inserts every triple of iter in the graph.
Trait Implementations§
Source§impl<R: Clone> Clone for BTreeGraph<R>
impl<R: Clone> Clone for BTreeGraph<R>
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> Default for BTreeGraph<R>
impl<R> Default for BTreeGraph<R>
Source§impl<'de, R: Resource + Clone + Ord + Deserialize<'de>> Deserialize<'de> for BTreeGraph<R>
Available on crate feature serde only.
impl<'de, R: Resource + Clone + Ord + Deserialize<'de>> Deserialize<'de> for BTreeGraph<R>
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl<R: Resource + Eq> Eq for BTreeGraph<R>
Source§impl<R: Resource + Clone + Ord> Extend<Triple<R, R, R>> for BTreeGraph<R>
impl<R: Resource + Clone + Ord> Extend<Triple<R, R, R>> for BTreeGraph<R>
Source§fn extend<T: IntoIterator<Item = Triple<R, R, R>>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Triple<R, R, R>>>(&mut self, iter: T)
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: Resource> From<BTreeGraph<R>> for IndexedBTreeGraph<R>
impl<R: Resource> From<BTreeGraph<R>> for IndexedBTreeGraph<R>
Source§fn from(value: BTreeGraph<R>) -> Self
fn from(value: BTreeGraph<R>) -> Self
Converts to this type from the input type.
Source§impl<R: Resource + Clone + Ord> FromIterator<Triple<R, R, R>> for BTreeGraph<R>
impl<R: Resource + Clone + Ord> FromIterator<Triple<R, R, R>> for BTreeGraph<R>
Source§impl<R: Resource> Graph for BTreeGraph<R>
impl<R: Resource> Graph for BTreeGraph<R>
Source§impl<'a, R: Resource> IntoIterator for &'a BTreeGraph<R>
impl<'a, R: Resource> IntoIterator for &'a BTreeGraph<R>
Source§impl<R: Resource + Clone> IntoIterator for BTreeGraph<R>
impl<R: Resource + Clone> IntoIterator for BTreeGraph<R>
Source§impl<R: Resource + Ord> Ord for BTreeGraph<R>
impl<R: Resource + Ord> Ord for BTreeGraph<R>
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: Resource + PartialOrd> PartialOrd for BTreeGraph<R>
impl<R: Resource + PartialOrd> PartialOrd for BTreeGraph<R>
Source§impl<R: Resource + RdfDisplay> RdfDisplay for BTreeGraph<R>
impl<R: Resource + 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: Resource> ResourceTraversableGraph for BTreeGraph<R>
impl<R: Resource> ResourceTraversableGraph 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) -> Self::GraphResources<'_>
fn graph_resources(&self) -> Self::GraphResources<'_>
Returns an iterator over the resources of this graph.
Source§fn graph_resource_count(&self) -> usize
fn graph_resource_count(&self) -> usize
Returns the number of resources in this graph.
Source§impl<R: Resource + Serialize> Serialize for BTreeGraph<R>
Available on crate feature serde only.
impl<R: Resource + Serialize> Serialize for BTreeGraph<R>
Available on crate feature
serde only.Source§impl<R: Resource> TraversableGraph for BTreeGraph<R>
impl<R: Resource> TraversableGraph for BTreeGraph<R>
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<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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.