pub trait StorageClient: Send + Sync {
// Required methods
fn list(&self, prefix_or_path: &str) -> FloeResult<Vec<ObjectRef>>;
fn download_to_temp(
&self,
uri: &str,
temp_dir: &Path,
) -> FloeResult<PathBuf>;
fn upload_from_path(&self, local_path: &Path, uri: &str) -> FloeResult<()>;
fn resolve_uri(&self, path: &str) -> FloeResult<String>;
fn copy_object(&self, src_uri: &str, dst_uri: &str) -> FloeResult<()>;
fn delete_object(&self, uri: &str) -> FloeResult<()>;
fn exists(&self, uri: &str) -> FloeResult<bool>;
// Provided methods
fn read_object(&self, uri: &str) -> FloeResult<Option<StoredObject>> { ... }
fn write_object_conditional(
&self,
uri: &str,
expected_version: Option<&str>,
body: &[u8],
) -> FloeResult<ConditionalWrite> { ... }
fn delete_object_conditional(
&self,
uri: &str,
expected_version: Option<&str>,
) -> FloeResult<ConditionalWrite> { ... }
}Required Methods§
fn list(&self, prefix_or_path: &str) -> FloeResult<Vec<ObjectRef>>
fn download_to_temp(&self, uri: &str, temp_dir: &Path) -> FloeResult<PathBuf>
fn upload_from_path(&self, local_path: &Path, uri: &str) -> FloeResult<()>
fn resolve_uri(&self, path: &str) -> FloeResult<String>
fn copy_object(&self, src_uri: &str, dst_uri: &str) -> FloeResult<()>
fn delete_object(&self, uri: &str) -> FloeResult<()>
fn exists(&self, uri: &str) -> FloeResult<bool>
Provided Methods§
fn read_object(&self, uri: &str) -> FloeResult<Option<StoredObject>>
fn write_object_conditional( &self, uri: &str, expected_version: Option<&str>, body: &[u8], ) -> FloeResult<ConditionalWrite>
fn delete_object_conditional( &self, uri: &str, expected_version: Option<&str>, ) -> FloeResult<ConditionalWrite>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".