Skip to main content

Backing

Trait Backing 

Source
pub trait Backing {
    // Required methods
    fn put(&mut self, at: Rev, bytes: &[u8]) -> Result<()>;
    fn get(&self, at: Rev) -> Result<Option<Vec<u8>>>;
    fn names(&self, at: Rev) -> String;
}
Expand description

Where a session keeps the document at every rev: a directory, or a map that dies with the process. The same bytes either way.

Required Methods§

Source

fn put(&mut self, at: Rev, bytes: &[u8]) -> Result<()>

§Errors

The write that did not land.

Source

fn get(&self, at: Rev) -> Result<Option<Vec<u8>>>

The bytes rev at was written as, or None where nothing was.

§Errors

The read that did not work — which is not the same as nothing being there.

Source

fn names(&self, at: Rev) -> String

What a report calls rev at’s home.

Implementors§

Source§

impl Backing for Memory

Source§

impl<S: Storage> Backing for Revs<'_, S>