pub struct File { /* private fields */ }Expand description
A file stored in the block storage.
Might actually refer to a directory. Check MainBlock::kind to determine that.
Implementations§
Source§impl File
impl File
pub fn main_block(&self) -> &MainBlock
pub fn position(&self) -> u64
pub fn seek(&mut self, position: u64) -> Result<(), Error>
pub fn open<R: ReadBlock>( main_block_ref: &BlockRef, reader: &mut R, ) -> Result<Self, Error>
pub fn from_main_block(main_block: MainBlock) -> Self
pub fn read<R: ReadBlock>( &mut self, buf: &mut [u8], reader: &mut R, ) -> Result<usize, Error>
pub fn read_exact<R: ReadBlock>( &mut self, buf: &mut [u8], reader: &mut R, ) -> Result<(), Error>
pub fn read_to_end<R: ReadBlock>( &mut self, buf: &mut Vec<u8>, reader: &mut R, ) -> Result<usize, Error>
Auto Trait Implementations§
impl !Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnsafeUnpin for File
impl UnwindSafe for File
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