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>