pub struct PackWriter { /* private fields */ }Implementations§
Source§impl PackWriter
impl PackWriter
pub fn new(packs_dir: &Path) -> Result<Self>
pub fn add(&mut self, content: &[u8]) -> Result<String>
pub fn add_pre_compressed( &mut self, hash_hex: String, compressed: Vec<u8>, ) -> Result<()>
pub fn add_pre_compressed_bytes( &mut self, hash: [u8; 16], compressed: Vec<u8>, ) -> Result<()>
pub fn is_empty(&self) -> bool
Sourcepub fn finish(self) -> Result<String>
pub fn finish(self) -> Result<String>
Finalize: write real header, persist .dat, write .idx. Returns pack hash.
Sourcepub fn finish_with_options(self, options: PackFinishOptions) -> Result<String>
pub fn finish_with_options(self, options: PackFinishOptions) -> Result<String>
Finalize the pack and optionally split the resulting .dat file into contiguous part files. The existing unchunked finish path is the default.
Auto Trait Implementations§
impl Freeze for PackWriter
impl RefUnwindSafe for PackWriter
impl Send for PackWriter
impl Sync for PackWriter
impl Unpin for PackWriter
impl UnsafeUnpin for PackWriter
impl UnwindSafe for PackWriter
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