pub trait DynFiles:
Send
+ Sync
+ 'static {
// Required methods
fn provider(&self) -> &ProviderId;
fn upload_file(
&self,
options: UploadFileOptions,
) -> BoxFuture<'_, Result<UploadFileResult, ProviderError>>;
fn supports_get_file_metadata(&self) -> bool;
fn get_file_metadata(
&self,
options: FileReferenceOptions,
) -> BoxFuture<'_, Result<FileMetadataResult, ProviderError>>;
fn supports_download_file(&self) -> bool;
fn download_file(
&self,
options: FileReferenceOptions,
) -> BoxFuture<'_, Result<DownloadFileResult, ProviderError>>;
fn supports_delete_file(&self) -> bool;
fn delete_file(
&self,
options: FileReferenceOptions,
) -> BoxFuture<'_, Result<DeleteFileResult, ProviderError>>;
}Expand description
Object-safe counterpart of Files.
Required Methods§
Sourcefn provider(&self) -> &ProviderId
fn provider(&self) -> &ProviderId
See Files::provider.
Sourcefn upload_file(
&self,
options: UploadFileOptions,
) -> BoxFuture<'_, Result<UploadFileResult, ProviderError>>
fn upload_file( &self, options: UploadFileOptions, ) -> BoxFuture<'_, Result<UploadFileResult, ProviderError>>
See Files::upload_file.
Sourcefn supports_get_file_metadata(&self) -> bool
fn supports_get_file_metadata(&self) -> bool
Sourcefn get_file_metadata(
&self,
options: FileReferenceOptions,
) -> BoxFuture<'_, Result<FileMetadataResult, ProviderError>>
fn get_file_metadata( &self, options: FileReferenceOptions, ) -> BoxFuture<'_, Result<FileMetadataResult, ProviderError>>
Sourcefn supports_download_file(&self) -> bool
fn supports_download_file(&self) -> bool
Sourcefn download_file(
&self,
options: FileReferenceOptions,
) -> BoxFuture<'_, Result<DownloadFileResult, ProviderError>>
fn download_file( &self, options: FileReferenceOptions, ) -> BoxFuture<'_, Result<DownloadFileResult, ProviderError>>
See Files::download_file.
Sourcefn supports_delete_file(&self) -> bool
fn supports_delete_file(&self) -> bool
Sourcefn delete_file(
&self,
options: FileReferenceOptions,
) -> BoxFuture<'_, Result<DeleteFileResult, ProviderError>>
fn delete_file( &self, options: FileReferenceOptions, ) -> BoxFuture<'_, Result<DeleteFileResult, ProviderError>>
See Files::delete_file.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".