pub trait StorageFile:
AsyncRead
+ AsyncWrite
+ AsyncSeek
+ Unpin
+ Send
+ Sync
+ 'static {
// Required methods
fn sync_all(&self) -> impl Future<Output = Result<()>> + Send;
fn sync_data(&self) -> impl Future<Output = Result<()>> + Send;
fn size(&self) -> impl Future<Output = Result<u64>> + Send;
fn set_len(&self, size: u64) -> impl Future<Output = Result<()>> + Send;
}Expand description
Trait for file handles that support async read/write/seek operations.
Required Methods§
Sourcefn sync_all(&self) -> impl Future<Output = Result<()>> + Send
fn sync_all(&self) -> impl Future<Output = Result<()>> + Send
Flush all OS-internal metadata and data to disk.
Sourcefn sync_data(&self) -> impl Future<Output = Result<()>> + Send
fn sync_data(&self) -> impl Future<Output = Result<()>> + Send
Flush all data to disk (metadata may not be synced).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl StorageFile for TokioStorageFile
Available on crate feature
tokio-providers only.