Trait external_storage::ExternalStorage [−][src]
An abstraction of an external storage.
Required methods
fn name(&self) -> &'static str
[src]
fn url(&self) -> Result<Url>
[src]
fn write(
&self,
name: &str,
reader: Box<dyn AsyncRead + Send + Unpin>,
content_length: u64
) -> Result<()>
[src]
&self,
name: &str,
reader: Box<dyn AsyncRead + Send + Unpin>,
content_length: u64
) -> Result<()>
Write all contents of the read to the given path.
fn read(&self, name: &str) -> Box<dyn AsyncRead + Unpin>
[src]
Read all contents of the given path.
Provided methods
fn restore(
&self,
storage_name: &str,
restore_name: PathBuf,
expected_length: u64,
speed_limiter: &Limiter
) -> Result<()>
[src]
&self,
storage_name: &str,
restore_name: PathBuf,
expected_length: u64,
speed_limiter: &Limiter
) -> Result<()>
Read from external storage and restore to the given path
Implementations on Foreign Types
impl ExternalStorage for Arc<dyn ExternalStorage>
[src]
fn name(&self) -> &'static str
[src]
fn url(&self) -> Result<Url>
[src]
fn write(
&self,
name: &str,
reader: Box<dyn AsyncRead + Send + Unpin>,
content_length: u64
) -> Result<()>
[src]
&self,
name: &str,
reader: Box<dyn AsyncRead + Send + Unpin>,
content_length: u64
) -> Result<()>
fn read(&self, name: &str) -> Box<dyn AsyncRead + Unpin>
[src]
impl ExternalStorage for Box<dyn ExternalStorage>
[src]
fn name(&self) -> &'static str
[src]
fn url(&self) -> Result<Url>
[src]
fn write(
&self,
name: &str,
reader: Box<dyn AsyncRead + Send + Unpin>,
content_length: u64
) -> Result<()>
[src]
&self,
name: &str,
reader: Box<dyn AsyncRead + Send + Unpin>,
content_length: u64
) -> Result<()>
fn read(&self, name: &str) -> Box<dyn AsyncRead + Unpin>
[src]
Implementors
impl ExternalStorage for LocalStorage
[src]
fn name(&self) -> &'static str
[src]
fn url(&self) -> Result<Url>
[src]
fn write(
&self,
name: &str,
reader: Box<dyn AsyncRead + Send + Unpin>,
_content_length: u64
) -> Result<()>
[src]
&self,
name: &str,
reader: Box<dyn AsyncRead + Send + Unpin>,
_content_length: u64
) -> Result<()>