Skip to main content

IStorageFile

Trait IStorageFile 

Source
pub trait IStorageFile: IStorageItem {
    // Required methods
    fn open_read_async(&self) -> LocalBoxFuture<Result<Box<dyn Read>>>;
    fn open_write_async(&self) -> LocalBoxFuture<Result<Box<dyn Write>>>;
}
Expand description

Represents a file. Provides information about the file and its contents, and ways to manipulate them.

This interface is not meant to be implemented by applications.

Required Methods§

Source

fn open_read_async(&self) -> LocalBoxFuture<Result<Box<dyn Read>>>

Opens a stream for read access.

Fails (among other reasons) when access to the file is denied.

Source

fn open_write_async(&self) -> LocalBoxFuture<Result<Box<dyn Write>>>

Opens a stream for writing to the file.

Fails (among other reasons) when access to the file is denied.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§