pub struct Dat2(/* private fields */);Expand description
A virtual file type for the .dat2 file.
Implementations§
Source§impl Dat2
impl Dat2
Sourcepub fn new<P: AsRef<Path>>(path: P) -> Result<Self, Error>
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Initializes a memory map over the specified .dat2 file.
Sourcepub fn read(&self, archive_ref: &ArchiveRef) -> Result<Buffer<Encoded>, Error>
pub fn read(&self, archive_ref: &ArchiveRef) -> Result<Buffer<Encoded>, Error>
Read all the data that belongs to the ArchiveRef.
Sourcepub fn read_into_writer<W>(
&self,
archive_ref: &ArchiveRef,
writer: &mut W,
) -> Result<(), Error>where
W: Write,
pub fn read_into_writer<W>(
&self,
archive_ref: &ArchiveRef,
writer: &mut W,
) -> Result<(), Error>where
W: Write,
Read all the data that belongs to the ArchiveRef into the given writer.
pub fn metadata(&self, archive_ref: &ArchiveRef) -> Result<IndexMetadata, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dat2
impl RefUnwindSafe for Dat2
impl Send for Dat2
impl Sync for Dat2
impl Unpin for Dat2
impl UnwindSafe for Dat2
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