StorageFile

Trait StorageFile 

Source
pub trait StorageFile:
    Read
    + Write
    + Seek
    + Sealed {
    // Required method
    fn set_len(&mut self, new_len: u64) -> Result<()>;
}
Expand description

This trait is the combination of the std::io stream traits with an additional method to resize the file.

Required Methods§

Source

fn set_len(&mut self, new_len: u64) -> Result<()>

Performs the resize. Assumes the same behaviour as std::fs::File::set_len.

Implementations on Foreign Types§

Source§

impl StorageFile for File

Source§

fn set_len(&mut self, new_len: u64) -> Result<()>

Source§

impl StorageFile for Cursor<Vec<u8>>

Source§

fn set_len(&mut self, new_len: u64) -> Result<()>

Source§

impl<T: StorageFile> StorageFile for &mut T

Source§

fn set_len(&mut self, new_len: u64) -> Result<()>

Implementors§