Trait ligature::Ligature[][src]

pub trait Ligature {
    fn all_datasets(
        &self
    ) -> Box<dyn Iterator<Item = Result<Dataset, LigatureError>>>;
fn dataset_exists(&self, dataset: &Dataset) -> Result<bool, LigatureError>;
fn match_datasets_prefix(
        &self,
        prefix: &str
    ) -> Box<dyn Iterator<Item = Result<Dataset, LigatureError>>>;
fn match_datasets_range(
        &self,
        start: &str,
        end: &str
    ) -> Box<dyn Iterator<Item = Result<Dataset, LigatureError>>>;
fn create_dataset(&self, dataset: &Dataset) -> Result<(), LigatureError>;
fn delete_dataset(&self, dataset: &Dataset) -> Result<(), LigatureError>;
fn query(
        &self,
        dataset: &Dataset
    ) -> Result<Box<dyn QueryTx>, LigatureError>;
fn write(
        &self,
        dataset: &Dataset
    ) -> Result<Box<dyn WriteTx>, LigatureError>; }

A trait that all Ligature implementations implement.

Required methods

fn all_datasets(
    &self
) -> Box<dyn Iterator<Item = Result<Dataset, LigatureError>>>
[src]

Returns all Datasets in a Ligature instance.

fn dataset_exists(&self, dataset: &Dataset) -> Result<bool, LigatureError>[src]

Check if a given Dataset exists.

fn match_datasets_prefix(
    &self,
    prefix: &str
) -> Box<dyn Iterator<Item = Result<Dataset, LigatureError>>>
[src]

Returns all Datasets in a Ligature instance that start with the given prefix.

fn match_datasets_range(
    &self,
    start: &str,
    end: &str
) -> Box<dyn Iterator<Item = Result<Dataset, LigatureError>>>
[src]

Returns all Datasets in a Ligature instance that are in a given range (inclusive, exclusive].

fn create_dataset(&self, dataset: &Dataset) -> Result<(), LigatureError>[src]

Creates a dataset with the given name. TODO should probably return its own error type { InvalidDataset, DatasetExists, CouldNotCreateDataset }

fn delete_dataset(&self, dataset: &Dataset) -> Result<(), LigatureError>[src]

Deletes a dataset with the given name. TODO should probably return its own error type { InvalidDataset, CouldNotDeleteDataset }

fn query(&self, dataset: &Dataset) -> Result<Box<dyn QueryTx>, LigatureError>[src]

Initiazes a QueryTx TODO should probably return its own error type CouldNotInitializeQueryTx

fn write(&self, dataset: &Dataset) -> Result<Box<dyn WriteTx>, LigatureError>[src]

Initiazes a WriteTx TODO should probably return its own error type CouldNotInitializeWriteTx

Loading content...

Implementors

Loading content...