sophia_api::graph::adapter

Struct UnionGraph

Source
pub struct UnionGraph<T: Dataset>(/* private fields */);
Expand description

I wrap a Dataset as a Graph corresponding to the union of all graphs (default and named) from the original dataset.

Implementations§

Source§

impl<T: Dataset> UnionGraph<T>

Source

pub fn new(wrapped: T) -> Self

Wrap the given dataset as a the union of all its graphs.

Source

pub fn unwrap(self) -> T

Unwrap the inner Dataset.

Trait Implementations§

Source§

impl<T: Clone + Dataset> Clone for UnionGraph<T>

Source§

fn clone(&self) -> UnionGraph<T>

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<T: Debug + Dataset> Debug for UnionGraph<T>

Source§

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

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

impl<T: Dataset> Graph for UnionGraph<T>

Source§

type Triple<'x> = [<<T 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 = <T 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 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 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 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<T: Copy + Dataset> Copy for UnionGraph<T>

Auto Trait Implementations§

§

impl<T> Freeze for UnionGraph<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for UnionGraph<T>
where T: RefUnwindSafe,

§

impl<T> Send for UnionGraph<T>
where T: Send,

§

impl<T> Sync for UnionGraph<T>
where T: Sync,

§

impl<T> Unpin for UnionGraph<T>
where T: Unpin,

§

impl<T> UnwindSafe for UnionGraph<T>
where T: 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.