Struct virtual_fs::mem_fs::offloaded_file::OffloadedFile
source · pub struct OffloadedFile {
backing: OffloadBackingStore,
limiter: Option<DynFsMemoryLimiter>,
extents: Vec<FileExtent>,
size: u64,
}
Fields§
§backing: OffloadBackingStore
§limiter: Option<DynFsMemoryLimiter>
§extents: Vec<FileExtent>
§size: u64
Implementations§
source§impl OffloadedFile
impl OffloadedFile
pub fn new( limiter: Option<DynFsMemoryLimiter>, backing: OffloadBackingStore, ) -> Self
pub fn seek(&self, position: SeekFrom, cursor: &mut u64) -> Result<u64>
pub fn read(&self, buf: &mut [u8], cursor: &mut u64) -> Result<usize>
pub fn write( &mut self, data: OffloadWrite<'_>, cursor: &mut u64, ) -> Result<usize>
pub fn flush(&mut self) -> Result<()>
pub fn resize(&mut self, new_len: u64, value: u8)
pub fn len(&self) -> u64
pub fn truncate(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OffloadedFile
impl !RefUnwindSafe for OffloadedFile
impl Send for OffloadedFile
impl Sync for OffloadedFile
impl Unpin for OffloadedFile
impl !UnwindSafe for OffloadedFile
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more