Trait bonsaidb::local::BackupLocation [−][src]
pub trait BackupLocation: Send + Sync {
type Error: AnyError;
fn store(
&self,
schema: &SchemaName,
database_name: &str,
container: &str,
name: &str,
object: &[u8]
) -> Result<(), Self::Error>;
fn list_schemas(&self) -> Result<Vec<SchemaName, Global>, Self::Error>;
fn list_databases(
&self,
schema: &SchemaName
) -> Result<Vec<String, Global>, Self::Error>;
fn list_stored(
&self,
schema: &SchemaName,
database_name: &str,
container: &str
) -> Result<Vec<String, Global>, Self::Error>;
fn load(
&self,
schema: &SchemaName,
database_name: &str,
container: &str,
name: &str
) -> Result<Vec<u8, Global>, Self::Error>;
}
Expand description
A location to store and restore a database from.
Associated Types
Required methods
Store object
at path
with name
.
fn list_schemas(&self) -> Result<Vec<SchemaName, Global>, Self::Error>
fn list_schemas(&self) -> Result<Vec<SchemaName, Global>, Self::Error>
Lists all of the schemas stored in this backup location.
fn list_databases(
&self,
schema: &SchemaName
) -> Result<Vec<String, Global>, Self::Error>
fn list_databases(
&self,
schema: &SchemaName
) -> Result<Vec<String, Global>, Self::Error>
List all of the names of the databases stored for schema
.
fn list_stored(
&self,
schema: &SchemaName,
database_name: &str,
container: &str
) -> Result<Vec<String, Global>, Self::Error>
fn list_stored(
&self,
schema: &SchemaName,
database_name: &str,
container: &str
) -> Result<Vec<String, Global>, Self::Error>
List all stored named objects at path
. The names should be the same that were provided when store()
was called.