[][src]Trait endbasic_core::program::Store

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

Abstract operations to load and store programs on persistent storage.

Required methods

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

Deletes the program given by name.

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

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

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

Loads the contents of the program given by name.

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

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

Loading content...

Implementors

Loading content...