[][src]Trait io_ranges::MinimalFile

pub trait MinimalFile {
    fn metadata(&self) -> Result<Metadata>;
fn advise(&self, offset: u64, len: u64, advice: Advice) -> Result<()>; }

A minimal base trait for file I/O. Defines operations common to all kinds of random-access devices that fit the "file" concept, including normal files, block devices, and in-memory buffers.

Required methods

fn metadata(&self) -> Result<Metadata>[src]

Return the Metadata for the file. This is similar to std::fs::File::metadata, though it returns fewer fields since the underlying device may not be an actual filesystem inode.

fn advise(&self, offset: u64, len: u64, advice: Advice) -> Result<()>[src]

Announce the expected access pattern of the data at the given offset.

Loading content...

Implementations on Foreign Types

impl MinimalFile for File[src]

impl MinimalFile for [u8][src]

impl MinimalFile for Vec<u8>[src]

Loading content...

Implementors

impl MinimalFile for FileEditor[src]

impl MinimalFile for FileReader[src]

impl MinimalFile for FileWriter[src]

Loading content...