pub struct ArchiveWriter { /* private fields */ }Expand description
Writer for CASC archive files
Implementations§
Source§impl ArchiveWriter
impl ArchiveWriter
Sourcepub fn append(path: &Path, archive_id: u16) -> Result<Self>
pub fn append(path: &Path, archive_id: u16) -> Result<Self>
Open an existing archive for appending
Sourcepub fn write(&mut self, data: &[u8]) -> Result<u64>
pub fn write(&mut self, data: &[u8]) -> Result<u64>
Write data to the archive and return the offset
Sourcepub fn write_aligned(&mut self, data: &[u8], alignment: u64) -> Result<u64>
pub fn write_aligned(&mut self, data: &[u8], alignment: u64) -> Result<u64>
Write data with alignment padding
Sourcepub fn current_offset(&self) -> u64
pub fn current_offset(&self) -> u64
Get the current offset in the archive
Sourcepub fn archive_id(&self) -> u16
pub fn archive_id(&self) -> u16
Get the archive ID
Auto Trait Implementations§
impl Freeze for ArchiveWriter
impl RefUnwindSafe for ArchiveWriter
impl Send for ArchiveWriter
impl Sync for ArchiveWriter
impl Unpin for ArchiveWriter
impl UnwindSafe for ArchiveWriter
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