[][src]Trait sophia::dataset::inmem::DatasetWrapper

pub trait DatasetWrapper<'a> {
    type Wrapped: Dataset<'a>;
    fn get_wrapped(&'a self) -> &'a Self::Wrapped;
fn get_wrapped_mut(&'a mut self) -> &'a mut Self::Wrapped; fn dw_quads(&'a self) -> DQuadSource<'a, Self::Wrapped> { ... }
fn dw_quads_with_s<T>(
        &'a self,
        s: &'a Term<T>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData
, { ... }
fn dw_quads_with_p<T>(
        &'a self,
        p: &'a Term<T>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData
, { ... }
fn dw_quads_with_o<T>(
        &'a self,
        o: &'a Term<T>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData
, { ... }
fn dw_quads_with_g<T>(
        &'a self,
        g: Option<&'a Term<T>>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData
, { ... }
fn dw_quads_with_sp<T, U>(
        &'a self,
        s: &'a Term<T>,
        p: &'a Term<U>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData,
        U: TermData
, { ... }
fn dw_quads_with_so<T, U>(
        &'a self,
        s: &'a Term<T>,
        o: &'a Term<U>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData,
        U: TermData
, { ... }
fn dw_quads_with_sg<T, U>(
        &'a self,
        s: &'a Term<T>,
        g: Option<&'a Term<U>>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData,
        U: TermData
, { ... }
fn dw_quads_with_po<T, U>(
        &'a self,
        p: &'a Term<T>,
        o: &'a Term<U>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData,
        U: TermData
, { ... }
fn dw_quads_with_pg<T, U>(
        &'a self,
        p: &'a Term<T>,
        g: Option<&'a Term<U>>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData,
        U: TermData
, { ... }
fn dw_quads_with_og<T, U>(
        &'a self,
        o: &'a Term<T>,
        g: Option<&'a Term<U>>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData,
        U: TermData
, { ... }
fn dw_quads_with_spo<T, U, V>(
        &'a self,
        s: &'a Term<T>,
        p: &'a Term<U>,
        o: &'a Term<V>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData,
        U: TermData,
        V: TermData
, { ... }
fn dw_quads_with_spg<T, U, V>(
        &'a self,
        s: &'a Term<T>,
        p: &'a Term<U>,
        g: Option<&'a Term<V>>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData,
        U: TermData,
        V: TermData
, { ... }
fn dw_quads_with_sog<T, U, V>(
        &'a self,
        s: &'a Term<T>,
        o: &'a Term<U>,
        g: Option<&'a Term<V>>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData,
        U: TermData,
        V: TermData
, { ... }
fn dw_quads_with_pog<T, U, V>(
        &'a self,
        p: &'a Term<T>,
        o: &'a Term<U>,
        g: Option<&'a Term<V>>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData,
        U: TermData,
        V: TermData
, { ... }
fn dw_quads_with_spog<T, U, V, W>(
        &'a self,
        s: &'a Term<T>,
        p: &'a Term<U>,
        o: &'a Term<V>,
        g: Option<&'a Term<W>>
    ) -> DQuadSource<'a, Self::Wrapped>
    where
        T: TermData,
        U: TermData,
        V: TermData,
        W: TermData
, { ... }
fn dw_contains<T, U, V, W>(
        &'a self,
        s: &'a Term<T>,
        p: &'a Term<U>,
        o: &'a Term<V>,
        g: Option<&'a Term<W>>
    ) -> DResult<'a, Self::Wrapped, bool>
    where
        T: TermData,
        U: TermData,
        V: TermData,
        W: TermData
, { ... }
fn dw_subjects(&'a self) -> DResultTermSet<'a, Self::Wrapped> { ... }
fn dw_predicates(&'a self) -> DResultTermSet<'a, Self::Wrapped> { ... }
fn dw_objects(&'a self) -> DResultTermSet<'a, Self::Wrapped> { ... }
fn dw_graph_names(&'a self) -> DResultTermSet<'a, Self::Wrapped> { ... }
fn dw_iris(&'a self) -> DResultTermSet<'a, Self::Wrapped> { ... }
fn dw_bnodes(&'a self) -> DResultTermSet<'a, Self::Wrapped> { ... }
fn dw_literals(&'a self) -> DResultTermSet<'a, Self::Wrapped> { ... }
fn dw_variables(&'a self) -> DResultTermSet<'a, Self::Wrapped> { ... } }

A dataset wrapper wraps a Dataset and overrides some of its methods.

This trait mimmics the interface of the Dataset trait, with all methods having a default implementation that delegates to the corresponding method of the wrapped dataset. Implementation of this trait may however expected to override some of the methods.

Conversely, the impl_dataset_for_wrapper! macro can be used to derive the Dataset implementation for any implementation of DatasetWrapper.

Associated Types

type Wrapped: Dataset<'a>

The type of the wrapped dataset.

Loading content...

Required methods

fn get_wrapped(&'a self) -> &'a Self::Wrapped

Borrow the wrapped dataset.

fn get_wrapped_mut(&'a mut self) -> &'a mut Self::Wrapped

Borrow the wrapped dataset mutably.

Loading content...

Provided methods

fn dw_quads(&'a self) -> DQuadSource<'a, Self::Wrapped>

Mimmic the iter method.

fn dw_quads_with_s<T>(
    &'a self,
    s: &'a Term<T>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData

Mimmic the quads_with_s method.

fn dw_quads_with_p<T>(
    &'a self,
    p: &'a Term<T>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData

Mimmic the quads_with_p method.

fn dw_quads_with_o<T>(
    &'a self,
    o: &'a Term<T>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData

Mimmic the quads_with_o method.

fn dw_quads_with_g<T>(
    &'a self,
    g: Option<&'a Term<T>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData

Mimmic the quads_with_g method.

fn dw_quads_with_sp<T, U>(
    &'a self,
    s: &'a Term<T>,
    p: &'a Term<U>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData

Mimmic the quads_with_sp method.

fn dw_quads_with_so<T, U>(
    &'a self,
    s: &'a Term<T>,
    o: &'a Term<U>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData

Mimmic the quads_with_so method.

fn dw_quads_with_sg<T, U>(
    &'a self,
    s: &'a Term<T>,
    g: Option<&'a Term<U>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData

Mimmic the quads_with_sg method.

fn dw_quads_with_po<T, U>(
    &'a self,
    p: &'a Term<T>,
    o: &'a Term<U>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData

Mimmic the quads_with_po method.

fn dw_quads_with_pg<T, U>(
    &'a self,
    p: &'a Term<T>,
    g: Option<&'a Term<U>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData

Mimmic the quads_with_pg method.

fn dw_quads_with_og<T, U>(
    &'a self,
    o: &'a Term<T>,
    g: Option<&'a Term<U>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData

Mimmic the quads_with_og method.

fn dw_quads_with_spo<T, U, V>(
    &'a self,
    s: &'a Term<T>,
    p: &'a Term<U>,
    o: &'a Term<V>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData,
    V: TermData

Mimmic the quads_with_spo method.

fn dw_quads_with_spg<T, U, V>(
    &'a self,
    s: &'a Term<T>,
    p: &'a Term<U>,
    g: Option<&'a Term<V>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData,
    V: TermData

Mimmic the quads_with_spg method.

fn dw_quads_with_sog<T, U, V>(
    &'a self,
    s: &'a Term<T>,
    o: &'a Term<U>,
    g: Option<&'a Term<V>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData,
    V: TermData

Mimmic the quads_with_sog method.

fn dw_quads_with_pog<T, U, V>(
    &'a self,
    p: &'a Term<T>,
    o: &'a Term<U>,
    g: Option<&'a Term<V>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData,
    V: TermData

Mimmic the quads_with_pog method.

fn dw_quads_with_spog<T, U, V, W>(
    &'a self,
    s: &'a Term<T>,
    p: &'a Term<U>,
    o: &'a Term<V>,
    g: Option<&'a Term<W>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData,
    V: TermData,
    W: TermData

Mimmic the quads_with_spog method.

fn dw_contains<T, U, V, W>(
    &'a self,
    s: &'a Term<T>,
    p: &'a Term<U>,
    o: &'a Term<V>,
    g: Option<&'a Term<W>>
) -> DResult<'a, Self::Wrapped, bool> where
    T: TermData,
    U: TermData,
    V: TermData,
    W: TermData

Mimmic the contains method.

fn dw_subjects(&'a self) -> DResultTermSet<'a, Self::Wrapped>

Mimmic the subjects method.

fn dw_predicates(&'a self) -> DResultTermSet<'a, Self::Wrapped>

Mimmic the predicates method.

fn dw_objects(&'a self) -> DResultTermSet<'a, Self::Wrapped>

Mimmic the objects method.

fn dw_graph_names(&'a self) -> DResultTermSet<'a, Self::Wrapped>

Mimmic the graph_names method.

fn dw_iris(&'a self) -> DResultTermSet<'a, Self::Wrapped>

Mimmic the iris method.

fn dw_bnodes(&'a self) -> DResultTermSet<'a, Self::Wrapped>

Mimmic the bnodes method.

fn dw_literals(&'a self) -> DResultTermSet<'a, Self::Wrapped>

Mimmic the literals method.

fn dw_variables(&'a self) -> DResultTermSet<'a, Self::Wrapped>

Mimmic the variables method.

Loading content...

Implementors

impl<'a, T> DatasetWrapper<'a> for GspoWrapper<T> where
    T: IndexedDataset + Dataset<'a, Quad = ([&'a Term<<T as IndexedDataset>::TermData>; 3], Option<&'a Term<<T as IndexedDataset>::TermData>>)>, 
[src]

type Wrapped = T

impl<'a, T> DatasetWrapper<'a> for OgpsWrapper<T> where
    T: IndexedDataset + Dataset<'a, Quad = ([&'a Term<<T as IndexedDataset>::TermData>; 3], Option<&'a Term<<T as IndexedDataset>::TermData>>)>, 
[src]

type Wrapped = T

Loading content...