Skip to main content

BackendChoice

Trait BackendChoice 

Source
pub trait BackendChoice {
    // Required method
    fn to_backend(
        &self,
        location: BackendLocation,
        options: Option<BTreeMap<String, String>>,
    ) -> RusticResult<Arc<dyn WriteBackend>>;
}
Expand description

Trait which can be implemented to choose a backend from a backend type, a backend path and options given as HashMap.

Required Methods§

Source

fn to_backend( &self, location: BackendLocation, options: Option<BTreeMap<String, String>>, ) -> RusticResult<Arc<dyn WriteBackend>>

Init backend from a path and options.

§Arguments
  • path - The path to create that points to the backend.
  • options - additional options for creating the backend
§Errors
  • If the backend is not supported.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§