pub struct MrcFile { /* private fields */ }
Expand description
MrcFile for file I/O operations with pread/pwrite
Implementations§
Source§impl MrcFile
impl MrcFile
pub fn open(path: impl AsRef<Path>) -> Result<Self, Error>
pub fn create(path: impl AsRef<Path>, header: Header) -> Result<Self, Error>
pub fn header(&self) -> &Header
pub fn header_mut(&mut self) -> &mut Header
pub fn read_view(&self) -> Result<MrcView<'static>, Error>
pub fn write_view(&mut self, view: &MrcView<'_>) -> Result<(), Error>
pub fn read_ext_header(&self) -> Result<&'static [u8], Error>
pub fn write_ext_header(&mut self, data: &[u8]) -> Result<(), Error>
pub fn read_data(&self) -> Result<&'static [u8], Error>
pub fn write_data(&mut self, data: &[u8]) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for MrcFile
impl RefUnwindSafe for MrcFile
impl Send for MrcFile
impl Sync for MrcFile
impl Unpin for MrcFile
impl UnwindSafe for MrcFile
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