pub trait MutableDataset: Dataset {
type GraphsMut<'a>: Iterator<Item = (Option<&'a Self::GraphLabel>, &'a mut Self::Graph)>
where Self: 'a;
// Required methods
fn graph_mut(
&mut self,
id: Option<&Self::GraphLabel>,
) -> Option<&mut Self::Graph>;
fn graphs_mut(&mut self) -> Self::GraphsMut<'_>;
fn insert_graph(
&mut self,
id: Self::GraphLabel,
graph: Self::Graph,
) -> Option<Self::Graph>;
fn insert(
&mut self,
quad: Quad<Self::Subject, Self::Predicate, Self::Object, Self::GraphLabel>,
) -> bool;
fn remove(
&mut self,
quad: Quad<&Self::Subject, &Self::Predicate, &Self::Object, &Self::GraphLabel>,
);
fn absorb<D: SizedDataset<Subject = Self::Subject, Predicate = Self::Predicate, Object = Self::Object, GraphLabel = Self::GraphLabel>>(
&mut self,
other: D,
)
where D::Graph: SizedGraph;
// Provided method
fn default_graph_mut(&mut self) -> &mut Self::Graph { ... }
}Expand description
Mutable dataset.
Required Associated Types§
Required Methods§
Sourcefn graph_mut(
&mut self,
id: Option<&Self::GraphLabel>,
) -> Option<&mut Self::Graph>
fn graph_mut( &mut self, id: Option<&Self::GraphLabel>, ) -> Option<&mut Self::Graph>
Get the given graph mutably.
Use the input None to get the default graph.
Note to implementors: the default graph should always exists.
Sourcefn graphs_mut(&mut self) -> Self::GraphsMut<'_>
fn graphs_mut(&mut self) -> Self::GraphsMut<'_>
Returns an iterator over the (mutable) graphs of the dataset.
Sourcefn insert_graph(
&mut self,
id: Self::GraphLabel,
graph: Self::Graph,
) -> Option<Self::Graph>
fn insert_graph( &mut self, id: Self::GraphLabel, 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.
Sourcefn insert(
&mut self,
quad: Quad<Self::Subject, Self::Predicate, Self::Object, Self::GraphLabel>,
) -> bool
fn insert( &mut self, quad: Quad<Self::Subject, Self::Predicate, Self::Object, Self::GraphLabel>, ) -> bool
Insert a quad in the dataset.
Sourcefn remove(
&mut self,
quad: Quad<&Self::Subject, &Self::Predicate, &Self::Object, &Self::GraphLabel>,
)
fn remove( &mut self, quad: Quad<&Self::Subject, &Self::Predicate, &Self::Object, &Self::GraphLabel>, )
Remove a quad from the dataset.
Sourcefn absorb<D: SizedDataset<Subject = Self::Subject, Predicate = Self::Predicate, Object = Self::Object, GraphLabel = Self::GraphLabel>>(
&mut self,
other: D,
)where
D::Graph: SizedGraph,
fn absorb<D: SizedDataset<Subject = Self::Subject, Predicate = Self::Predicate, Object = Self::Object, GraphLabel = Self::GraphLabel>>(
&mut self,
other: D,
)where
D::Graph: SizedGraph,
Absorb the given other dataset.
Adds all the quads of other in the dataset.
Provided Methods§
Sourcefn default_graph_mut(&mut self) -> &mut Self::Graph
fn default_graph_mut(&mut self) -> &mut Self::Graph
Get the default graph mutably.
Note to implementors: the default graph should always exists.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".