pub trait StorageFile:
Read
+ Write
+ Seek {
// Required method
fn set_len(&mut self, new_size: u64) -> Result<()>;
}Expand description
A trait representing a file-like reader/writer.
This trait is the combination of the std::io
stream traits with an additional method to resize the file.
Required Methods§
Sourcefn set_len(&mut self, new_size: u64) -> Result<()>
fn set_len(&mut self, new_size: u64) -> Result<()>
Resize the file. This method behaves the same as
File::set_len.
§Errors
See File::set_len for reasons this function could error.