[][src]Trait grdf::MutableDataset

pub trait MutableDataset<T = Term>: Dataset<T> {
    type GraphsMut: Iterator<Item = (Option<&'a T>, &'a mut Self::Graph)>;
    fn graph_mut(&mut self, id: Option<&T>) -> Option<&mut Self::Graph>;
fn graphs_mut<'a>(&'a mut self) -> Self::GraphsMut;
fn insert_graph(&mut self, id: T, graph: Self::Graph) -> Option<Self::Graph>;
fn insert(&mut self, quad: Quad<T>);
fn absorb<D: SizedDataset<T>>(&mut self, other: D)
    where
        D::Graph: SizedGraph<T>
; fn default_graph_mut(&mut self) -> &mut Self::Graph { ... } }

Mutable dataset.

Associated Types

type GraphsMut: Iterator<Item = (Option<&'a T>, &'a mut Self::Graph)>

Iterator over mutable graphs.

Loading content...

Required methods

fn graph_mut(&mut self, id: Option<&T>) -> Option<&mut Self::Graph>

Get the given graph mutabily.

Use the input None to get the default graph.

Note to implementors: the default graph should always exists.

fn graphs_mut<'a>(&'a mut self) -> Self::GraphsMut

Returns an iterator over the (mutable) graphs of the dataset.

fn insert_graph(&mut self, id: T, graph: Self::Graph) -> Option<Self::Graph>

Insert a graph in the dataset with the given name.

If a graph with the given name already exists, it is replaced and the previous graph definition is returned.

fn insert(&mut self, quad: Quad<T>)

Insert a quad in the dataset.

fn absorb<D: SizedDataset<T>>(&mut self, other: D) where
    D::Graph: SizedGraph<T>, 

Absorb the given other dataset.

Adds all the quads of other in the dataset.

Loading content...

Provided methods

fn default_graph_mut(&mut self) -> &mut Self::Graph

Get the default graph mutabily.

Note to implementors: the default graph should always exists.

Loading content...

Implementors

impl<T: 'static + Hash + Eq> MutableDataset<T> for HashDataset<T>[src]

type GraphsMut = GraphsMut<'a, T>

Loading content...