pub struct PackFile;Expand description
Writer/reader for .pack files.
Implementations§
Source§impl PackFile
impl PackFile
Sourcepub fn create(
pack_dir: &Path,
objects: &[(Hash, Vec<u8>)],
) -> Result<(PathBuf, PathBuf), PackError>
pub fn create( pack_dir: &Path, objects: &[(Hash, Vec<u8>)], ) -> Result<(PathBuf, PathBuf), PackError>
Write a new pack file (and its index) containing objects.
The pack name is derived from the BLAKE3 hash of the index, so identical packs are naturally deduplicated on disk.
Auto Trait Implementations§
impl Freeze for PackFile
impl RefUnwindSafe for PackFile
impl Send for PackFile
impl Sync for PackFile
impl Unpin for PackFile
impl UnsafeUnpin for PackFile
impl UnwindSafe for PackFile
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