pub trait Trips<C, F, S, T, E> {
// Required methods
fn collections(&self) -> Result<Vec<C>, E>;
fn add_collection(&mut self, collection: &C) -> Result<(), E>;
fn remove_collection(&mut self, collection: &C) -> Result<(), E>;
fn statements(&self, collection: &C) -> Result<Vec<Trip<F, S, T>>, E>;
fn add_statements(
&self,
collection: &C,
trips: Vec<Trip<F, S, T>>,
) -> Result<(), E>;
fn remove_statements(
&self,
collection: &C,
trips: Vec<Trip<F, S, T>>,
) -> Result<(), E>;
fn query(&self) -> Result<Box<dyn Query<F, S, T, E>>, E>;
}Expand description
A trait that defines all the actions a Ligature instance can perform. The API used for storing triples.
Required Methods§
Sourcefn collections(&self) -> Result<Vec<C>, E>
fn collections(&self) -> Result<Vec<C>, E>
Get all Collections.
Sourcefn add_collection(&mut self, collection: &C) -> Result<(), E>
fn add_collection(&mut self, collection: &C) -> Result<(), E>
Add a new Dataset. Does nothing if Dataset already exists.
Sourcefn remove_collection(&mut self, collection: &C) -> Result<(), E>
fn remove_collection(&mut self, collection: &C) -> Result<(), E>
Remove a Dataset. Does nothing if Dataset doesn’t exist.
Sourcefn statements(&self, collection: &C) -> Result<Vec<Trip<F, S, T>>, E>
fn statements(&self, collection: &C) -> Result<Vec<Trip<F, S, T>>, E>
Get all Statements in a given Dataset.
Sourcefn add_statements(
&self,
collection: &C,
trips: Vec<Trip<F, S, T>>,
) -> Result<(), E>
fn add_statements( &self, collection: &C, trips: Vec<Trip<F, S, T>>, ) -> Result<(), E>
Add Statements to a given Dataset. Returns Error if Dataset doesn’t exist. Does nothing if Statement already exists in Dataset.