Trips

Trait Trips 

Source
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§

Source

fn collections(&self) -> Result<Vec<C>, E>

Get all Collections.

Source

fn add_collection(&mut self, collection: &C) -> Result<(), E>

Add a new Dataset. Does nothing if Dataset already exists.

Source

fn remove_collection(&mut self, collection: &C) -> Result<(), E>

Remove a Dataset. Does nothing if Dataset doesn’t exist.

Source

fn statements(&self, collection: &C) -> Result<Vec<Trip<F, S, T>>, E>

Get all Statements in a given Dataset.

Source

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.

Source

fn remove_statements( &self, collection: &C, trips: Vec<Trip<F, S, T>>, ) -> Result<(), E>

Remove Statements from a given Dataset. Returns Error if Dataset doesn’t exist. Does nothing if Statement doesn’t exist in Dataset.

Source

fn query(&self) -> Result<Box<dyn Query<F, S, T, E>>, E>

Run a query against the given Dataset.

Implementors§