sophia_api::graph::adapter

Struct PartialUnionGraph

Source
pub struct PartialUnionGraph<D: Dataset, M: GraphNameMatcher> { /* private fields */ }
Expand description

I wrap a Dataset as a Graph corresponding to the union of a subset of its graphs, determined by a GraphNameMatcher.

Implementations§

Source§

impl<D: Dataset, M: GraphNameMatcher + Copy> PartialUnionGraph<D, M>

Source

pub fn new(d: D, m: M) -> Self

Wrap the given dataset as a single Graph (selected via the given graph name).

Source

pub fn unwrap(self) -> (D, M)

Unwrap the inner GraphName and Dataset.

Trait Implementations§

Source§

impl<D: Clone + Dataset, M: Clone + GraphNameMatcher> Clone for PartialUnionGraph<D, M>

Source§

fn clone(&self) -> PartialUnionGraph<D, M>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<D: Debug + Dataset, M: Debug + GraphNameMatcher> Debug for PartialUnionGraph<D, M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D: Dataset, M: GraphNameMatcher + Copy> Graph for PartialUnionGraph<D, M>

Source§

type Triple<'x> = [<<D as Dataset>::Quad<'x> as Quad>::Term; 3] where Self: 'x

Determine the type of Triples that the methods of this graph will yield.
Source§

type Error = <D as Dataset>::Error

The error type that this graph may raise.
Source§

fn triples(&self) -> GTripleSource<'_, Self>

An iterator visiting all triples of this graph in arbitrary order. Read more
Source§

fn triples_matching<'s, S, P, O>( &'s self, sm: S, pm: P, om: O, ) -> GTripleSource<'s, Self>
where S: TermMatcher + 's, P: TermMatcher + 's, O: TermMatcher + 's,

An iterator visiting all triples matching the given subject, predicate and object. See crate::term::matcher. Read more
Source§

fn contains<TS, TP, TO>(&self, s: TS, p: TP, o: TO) -> GResult<Self, bool>
where TS: Term, TP: Term, TO: Term,

Return true if this graph contains the given triple.
Source§

fn subjects(&self) -> GTermSource<'_, Self>

Build a fallible iterator of all the terms used as subject in this Graph. Read more
Source§

fn predicates(&self) -> GTermSource<'_, Self>

Build a fallible iterator of all the terms used as predicate in this Graph. Read more
Source§

fn objects(&self) -> GTermSource<'_, Self>

Build a fallible iterator of all the terms used as object in this Graph. Read more
Source§

fn iris(&self) -> GTermSource<'_, Self>

Build a fallible iterator of all the IRIs used in this Graph (including those used inside quoted triples, if any). Read more
Source§

fn blank_nodes(&self) -> GTermSource<'_, Self>

Build a fallible iterator of all the blank nodes used in this Graph (including those used inside quoted triples, if any). Read more
Source§

fn literals(&self) -> GTermSource<'_, Self>

Build a fallible iterator of all the literals used in this Graph (including those used inside quoted triples, if any). Read more
Source§

fn quoted_triples<'s>(&'s self) -> GTermSource<'s, Self>
where GTerm<'s, Self>: Clone,

Build a fallible iterator of all the quoted triples used in this Graph (including those used inside quoted triples, if any). Read more
Source§

fn variables(&self) -> GTermSource<'_, Self>

Build a fallible iterator of all the variables used in this Graph (including those used inside quoted triples, if any). Read more
Source§

fn as_dataset(&self) -> GraphAsDataset<&Self>

Dataset adapter borrowing this graph
Source§

fn as_dataset_mut(&mut self) -> GraphAsDataset<&mut Self>

Dataset adapter borrowing this graph mutably
Source§

fn into_dataset(self) -> GraphAsDataset<Self>
where Self: Sized,

Dataset adapter taking ownership of this graph
Source§

impl<D: Copy + Dataset, M: Copy + GraphNameMatcher> Copy for PartialUnionGraph<D, M>

Auto Trait Implementations§

§

impl<D, M> Freeze for PartialUnionGraph<D, M>
where D: Freeze, M: Freeze,

§

impl<D, M> RefUnwindSafe for PartialUnionGraph<D, M>

§

impl<D, M> Send for PartialUnionGraph<D, M>
where D: Send, M: Send,

§

impl<D, M> Sync for PartialUnionGraph<D, M>
where D: Sync, M: Sync,

§

impl<D, M> Unpin for PartialUnionGraph<D, M>
where D: Unpin, M: Unpin,

§

impl<D, M> UnwindSafe for PartialUnionGraph<D, M>
where D: UnwindSafe, M: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.