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

pub trait DatasetWrapper {
    type Wrapped: Dataset;
    fn get_wrapped(&self) -> &Self::Wrapped;
fn get_wrapped_mut(&mut self) -> &mut Self::Wrapped; fn dw_quads(&self) -> DQuadSource<'_, Self::Wrapped> { ... }
fn dw_quads_with_s<'s, TS: ?Sized>(
        &'s self,
        s: &'s TS
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TS: TTerm
, { ... }
fn dw_quads_with_p<'s, TP: ?Sized>(
        &'s self,
        p: &'s TP
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TP: TTerm
, { ... }
fn dw_quads_with_o<'s, TO: ?Sized>(
        &'s self,
        o: &'s TO
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TO: TTerm
, { ... }
fn dw_quads_with_g<'s, TG: ?Sized>(
        &'s self,
        g: Option<&'s TG>
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TG: TTerm
, { ... }
fn dw_quads_with_sp<'s, TS: ?Sized, TP: ?Sized>(
        &'s self,
        s: &'s TS,
        p: &'s TP
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TS: TTerm,
        TP: TTerm
, { ... }
fn dw_quads_with_so<'s, TS: ?Sized, TO: ?Sized>(
        &'s self,
        s: &'s TS,
        o: &'s TO
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TS: TTerm,
        TO: TTerm
, { ... }
fn dw_quads_with_sg<'s, TS: ?Sized, TG: ?Sized>(
        &'s self,
        s: &'s TS,
        g: Option<&'s TG>
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TS: TTerm,
        TG: TTerm
, { ... }
fn dw_quads_with_po<'s, TP: ?Sized, TO: ?Sized>(
        &'s self,
        p: &'s TP,
        o: &'s TO
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TP: TTerm,
        TO: TTerm
, { ... }
fn dw_quads_with_pg<'s, TP: ?Sized, TG: ?Sized>(
        &'s self,
        p: &'s TP,
        g: Option<&'s TG>
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TP: TTerm,
        TG: TTerm
, { ... }
fn dw_quads_with_og<'s, TO: ?Sized, TG: ?Sized>(
        &'s self,
        o: &'s TO,
        g: Option<&'s TG>
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TO: TTerm,
        TG: TTerm
, { ... }
fn dw_quads_with_spo<'s, TS: ?Sized, TP: ?Sized, TO: ?Sized>(
        &'s self,
        s: &'s TS,
        p: &'s TP,
        o: &'s TO
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TS: TTerm,
        TP: TTerm,
        TO: TTerm
, { ... }
fn dw_quads_with_spg<'s, TS: ?Sized, TP: ?Sized, TG: ?Sized>(
        &'s self,
        s: &'s TS,
        p: &'s TP,
        g: Option<&'s TG>
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TS: TTerm,
        TP: TTerm,
        TG: TTerm
, { ... }
fn dw_quads_with_sog<'s, TS: ?Sized, TO: ?Sized, TG: ?Sized>(
        &'s self,
        s: &'s TS,
        o: &'s TO,
        g: Option<&'s TG>
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TS: TTerm,
        TO: TTerm,
        TG: TTerm
, { ... }
fn dw_quads_with_pog<'s, TP: ?Sized, TO: ?Sized, TG: ?Sized>(
        &'s self,
        p: &'s TP,
        o: &'s TO,
        g: Option<&'s TG>
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TP: TTerm,
        TO: TTerm,
        TG: TTerm
, { ... }
fn dw_quads_with_spog<'s, TS: ?Sized, TP: ?Sized, TO: ?Sized, TG: ?Sized>(
        &'s self,
        s: &'s TS,
        p: &'s TP,
        o: &'s TO,
        g: Option<&'s TG>
    ) -> DQuadSource<'s, Self::Wrapped>
    where
        TS: TTerm,
        TP: TTerm,
        TO: TTerm,
        TG: TTerm
, { ... }
fn dw_contains<TS: ?Sized, TP: ?Sized, TO: ?Sized, TG: ?Sized>(
        &self,
        s: &TS,
        p: &TP,
        o: &TO,
        g: Option<&TG>
    ) -> DResult<Self::Wrapped, bool>
    where
        TS: TTerm,
        TP: TTerm,
        TO: TTerm,
        TG: TTerm
, { ... }
fn dw_subjects(&self) -> DResultTermSet<Self::Wrapped>
    where
        DTerm<Self::Wrapped>: Clone + Eq + Hash
, { ... }
fn dw_predicates(&self) -> DResultTermSet<Self::Wrapped>
    where
        DTerm<Self::Wrapped>: Clone + Eq + Hash
, { ... }
fn dw_objects(&self) -> DResultTermSet<Self::Wrapped>
    where
        DTerm<Self::Wrapped>: Clone + Eq + Hash
, { ... }
fn dw_graph_names(&self) -> DResultTermSet<Self::Wrapped>
    where
        DTerm<Self::Wrapped>: Clone + Eq + Hash
, { ... }
fn dw_iris(&self) -> DResultTermSet<Self::Wrapped>
    where
        DTerm<Self::Wrapped>: Clone + Eq + Hash
, { ... }
fn dw_bnodes(&self) -> DResultTermSet<Self::Wrapped>
    where
        DTerm<Self::Wrapped>: Clone + Eq + Hash
, { ... }
fn dw_literals(&self) -> DResultTermSet<Self::Wrapped>
    where
        DTerm<Self::Wrapped>: Clone + Eq + Hash
, { ... }
fn dw_variables(&self) -> DResultTermSet<Self::Wrapped>
    where
        DTerm<Self::Wrapped>: Clone + Eq + Hash
, { ... } }

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

The type of the wrapped dataset.

Loading content...

Required methods

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

Borrow the wrapped dataset.

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

Borrow the wrapped dataset mutably.

Loading content...

Provided methods

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

Mimmic the iter method.

fn dw_quads_with_s<'s, TS: ?Sized>(
    &'s self,
    s: &'s TS
) -> DQuadSource<'s, Self::Wrapped> where
    TS: TTerm

Mimmic the quads_with_s method.

fn dw_quads_with_p<'s, TP: ?Sized>(
    &'s self,
    p: &'s TP
) -> DQuadSource<'s, Self::Wrapped> where
    TP: TTerm

Mimmic the quads_with_p method.

fn dw_quads_with_o<'s, TO: ?Sized>(
    &'s self,
    o: &'s TO
) -> DQuadSource<'s, Self::Wrapped> where
    TO: TTerm

Mimmic the quads_with_o method.

fn dw_quads_with_g<'s, TG: ?Sized>(
    &'s self,
    g: Option<&'s TG>
) -> DQuadSource<'s, Self::Wrapped> where
    TG: TTerm

Mimmic the quads_with_g method.

fn dw_quads_with_sp<'s, TS: ?Sized, TP: ?Sized>(
    &'s self,
    s: &'s TS,
    p: &'s TP
) -> DQuadSource<'s, Self::Wrapped> where
    TS: TTerm,
    TP: TTerm

Mimmic the quads_with_sp method.

fn dw_quads_with_so<'s, TS: ?Sized, TO: ?Sized>(
    &'s self,
    s: &'s TS,
    o: &'s TO
) -> DQuadSource<'s, Self::Wrapped> where
    TS: TTerm,
    TO: TTerm

Mimmic the quads_with_so method.

fn dw_quads_with_sg<'s, TS: ?Sized, TG: ?Sized>(
    &'s self,
    s: &'s TS,
    g: Option<&'s TG>
) -> DQuadSource<'s, Self::Wrapped> where
    TS: TTerm,
    TG: TTerm

Mimmic the quads_with_sg method.

fn dw_quads_with_po<'s, TP: ?Sized, TO: ?Sized>(
    &'s self,
    p: &'s TP,
    o: &'s TO
) -> DQuadSource<'s, Self::Wrapped> where
    TP: TTerm,
    TO: TTerm

Mimmic the quads_with_po method.

fn dw_quads_with_pg<'s, TP: ?Sized, TG: ?Sized>(
    &'s self,
    p: &'s TP,
    g: Option<&'s TG>
) -> DQuadSource<'s, Self::Wrapped> where
    TP: TTerm,
    TG: TTerm

Mimmic the quads_with_pg method.

fn dw_quads_with_og<'s, TO: ?Sized, TG: ?Sized>(
    &'s self,
    o: &'s TO,
    g: Option<&'s TG>
) -> DQuadSource<'s, Self::Wrapped> where
    TO: TTerm,
    TG: TTerm

Mimmic the quads_with_og method.

fn dw_quads_with_spo<'s, TS: ?Sized, TP: ?Sized, TO: ?Sized>(
    &'s self,
    s: &'s TS,
    p: &'s TP,
    o: &'s TO
) -> DQuadSource<'s, Self::Wrapped> where
    TS: TTerm,
    TP: TTerm,
    TO: TTerm

Mimmic the quads_with_spo method.

fn dw_quads_with_spg<'s, TS: ?Sized, TP: ?Sized, TG: ?Sized>(
    &'s self,
    s: &'s TS,
    p: &'s TP,
    g: Option<&'s TG>
) -> DQuadSource<'s, Self::Wrapped> where
    TS: TTerm,
    TP: TTerm,
    TG: TTerm

Mimmic the quads_with_spg method.

fn dw_quads_with_sog<'s, TS: ?Sized, TO: ?Sized, TG: ?Sized>(
    &'s self,
    s: &'s TS,
    o: &'s TO,
    g: Option<&'s TG>
) -> DQuadSource<'s, Self::Wrapped> where
    TS: TTerm,
    TO: TTerm,
    TG: TTerm

Mimmic the quads_with_sog method.

fn dw_quads_with_pog<'s, TP: ?Sized, TO: ?Sized, TG: ?Sized>(
    &'s self,
    p: &'s TP,
    o: &'s TO,
    g: Option<&'s TG>
) -> DQuadSource<'s, Self::Wrapped> where
    TP: TTerm,
    TO: TTerm,
    TG: TTerm

Mimmic the quads_with_pog method.

fn dw_quads_with_spog<'s, TS: ?Sized, TP: ?Sized, TO: ?Sized, TG: ?Sized>(
    &'s self,
    s: &'s TS,
    p: &'s TP,
    o: &'s TO,
    g: Option<&'s TG>
) -> DQuadSource<'s, Self::Wrapped> where
    TS: TTerm,
    TP: TTerm,
    TO: TTerm,
    TG: TTerm

Mimmic the quads_with_spog method.

fn dw_contains<TS: ?Sized, TP: ?Sized, TO: ?Sized, TG: ?Sized>(
    &self,
    s: &TS,
    p: &TP,
    o: &TO,
    g: Option<&TG>
) -> DResult<Self::Wrapped, bool> where
    TS: TTerm,
    TP: TTerm,
    TO: TTerm,
    TG: TTerm

Mimmic the contains method.

fn dw_subjects(&self) -> DResultTermSet<Self::Wrapped> where
    DTerm<Self::Wrapped>: Clone + Eq + Hash

Mimmic the subjects method.

fn dw_predicates(&self) -> DResultTermSet<Self::Wrapped> where
    DTerm<Self::Wrapped>: Clone + Eq + Hash

Mimmic the predicates method.

fn dw_objects(&self) -> DResultTermSet<Self::Wrapped> where
    DTerm<Self::Wrapped>: Clone + Eq + Hash

Mimmic the objects method.

fn dw_graph_names(&self) -> DResultTermSet<Self::Wrapped> where
    DTerm<Self::Wrapped>: Clone + Eq + Hash

Mimmic the graph_names method.

fn dw_iris(&self) -> DResultTermSet<Self::Wrapped> where
    DTerm<Self::Wrapped>: Clone + Eq + Hash

Mimmic the iris method.

fn dw_bnodes(&self) -> DResultTermSet<Self::Wrapped> where
    DTerm<Self::Wrapped>: Clone + Eq + Hash

Mimmic the bnodes method.

fn dw_literals(&self) -> DResultTermSet<Self::Wrapped> where
    DTerm<Self::Wrapped>: Clone + Eq + Hash

Mimmic the literals method.

fn dw_variables(&self) -> DResultTermSet<Self::Wrapped> where
    DTerm<Self::Wrapped>: Clone + Eq + Hash

Mimmic the variables method.

Loading content...

Implementors

impl<T> DatasetWrapper for GspoWrapper<T> where
    T: IndexedDataset + Dataset<Quad = ByTermRefs<Term<<T as IndexedDataset>::TermData>>>, 
[src]

type Wrapped = T

impl<T> DatasetWrapper for OgpsWrapper<T> where
    T: IndexedDataset + Dataset<Quad = ByTermRefs<Term<<T as IndexedDataset>::TermData>>>, 
[src]

type Wrapped = T

Loading content...