Trait Target
pub trait Target: Send + Sync {
// Required methods
fn put(&self, name: &str, bytes: &[u8]) -> Result<()>;
fn get(&self, name: &str) -> Result<Option<Vec<u8>>>;
fn list(&self, prefix: &str) -> Result<Vec<String>>;
fn delete(&self, name: &str) -> Result<()>;
fn put_manifest(&self, bytes: &[u8]) -> Result<()>;
fn get_manifest(&self) -> Result<Option<Vec<u8>>>;
fn describe(&self) -> String;
// Provided method
fn cleanup(&self) -> Result<()> { ... }
}Expand description
Object storage for backups.
Names are relative paths of [A-Za-z0-9._-] segments separated by /.
The backup writes each name once, except to replace an object no
manifest names (a retry after a crash). Objects written before
put_manifest must be durable before the manifest
is, and a reader sees either the old manifest or the new one, whole.
Required Methods§
fn put(&self, name: &str, bytes: &[u8]) -> Result<()>
fn list(&self, prefix: &str) -> Result<Vec<String>>
fn list(&self, prefix: &str) -> Result<Vec<String>>
Every object name starting with prefix, sorted. The manifest is
not an object.