pub trait Storage: Send + Sync {
// Required methods
fn put(
&self,
path: &str,
contents: Vec<u8>,
) -> impl Future<Output = Result<()>> + Send;
fn put_with(
&self,
path: &str,
contents: Vec<u8>,
visibility: Visibility,
) -> impl Future<Output = Result<()>> + Send;
fn get(&self, path: &str) -> impl Future<Output = Result<Vec<u8>>> + Send;
fn exists(&self, path: &str) -> impl Future<Output = Result<bool>> + Send;
fn delete(&self, path: &str) -> impl Future<Output = Result<()>> + Send;
fn size(&self, path: &str) -> impl Future<Output = Result<u64>> + Send;
fn list(
&self,
prefix: &str,
) -> impl Future<Output = Result<Vec<Entry>>> + Send;
fn url(&self, path: &str) -> Option<String>;
}Expand description
The operations every driver supports.
Required Methods§
fn put( &self, path: &str, contents: Vec<u8>, ) -> impl Future<Output = Result<()>> + Send
fn put_with( &self, path: &str, contents: Vec<u8>, visibility: Visibility, ) -> impl Future<Output = Result<()>> + Send
fn get(&self, path: &str) -> impl Future<Output = Result<Vec<u8>>> + Send
fn exists(&self, path: &str) -> impl Future<Output = Result<bool>> + Send
fn delete(&self, path: &str) -> impl Future<Output = Result<()>> + Send
fn size(&self, path: &str) -> impl Future<Output = Result<u64>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".