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