[][src]Trait endbasic_std::store::Store

pub trait Store {
    fn delete(&mut self, name: &str) -> Result<()>;
fn enumerate(&self) -> Result<BTreeMap<String, Metadata>>;
fn get(&self, name: &str) -> Result<String>;
fn put(&mut self, name: &str, content: &str) -> Result<()>; }

Abstract operations to load and store programs on persistent storage.

Required methods

fn delete(&mut self, name: &str) -> Result<()>[src]

Deletes the program given by name.

fn enumerate(&self) -> Result<BTreeMap<String, Metadata>>[src]

Returns a sorted list of the entries in the store and their metadata.

fn get(&self, name: &str) -> Result<String>[src]

Loads the contents of the program given by name.

fn put(&mut self, name: &str, content: &str) -> Result<()>[src]

Saves the in-memory program given by content into name.

Loading content...

Implementors

impl Store for FileStore[src]

impl Store for InMemoryStore[src]

Loading content...