pub trait FileExt: Sealed {
// Required methods
fn read_at(&self, buf: &mut [u8], offset: u64) -> Result<usize>;
fn read_exact_at(&self, buf: &mut [u8], offset: u64) -> Result<()>;
fn write_at(&self, buf: &[u8], offset: u64) -> Result<usize>;
fn write_all_at(&self, buf: &[u8], offset: u64) -> Result<()>;
}Available on Unix only.
Expand description
Wrapper for std::os::unix::fs::FileExt.
The std traits might be extended in the future (See issue #49961). This trait is sealed and can not be implemented by other crates.
Required Methods§
Sourcefn read_at(&self, buf: &mut [u8], offset: u64) -> Result<usize>
fn read_at(&self, buf: &mut [u8], offset: u64) -> Result<usize>
Wrapper for std::os::unix::fs::FileExt::read_at.
Sourcefn read_exact_at(&self, buf: &mut [u8], offset: u64) -> Result<()>
fn read_exact_at(&self, buf: &mut [u8], offset: u64) -> Result<()>
Wrapper for std::os::unix::fs::FileExt::read_exact_at.
Sourcefn write_at(&self, buf: &[u8], offset: u64) -> Result<usize>
fn write_at(&self, buf: &[u8], offset: u64) -> Result<usize>
Wrapper for std::os::unix::fs::FileExt::write_at.
Sourcefn write_all_at(&self, buf: &[u8], offset: u64) -> Result<()>
fn write_all_at(&self, buf: &[u8], offset: u64) -> Result<()>
Wrapper for std::os::unix::fs::FileExt::write_all_at.