pub struct PackObjects<'a> { /* private fields */ }Expand description
Streaming pack-objects builder over an Odb.
Implementations§
Source§impl<'a> PackObjects<'a>
impl<'a> PackObjects<'a>
Sourcepub fn new(odb: &'a Odb, opts: PackObjectsOptions) -> Self
pub fn new(odb: &'a Odb, opts: PackObjectsOptions) -> Self
Create a builder reading objects from odb.
Sourcepub fn with_source_odb(self, source: &'a Odb) -> Self
pub fn with_source_odb(self, source: &'a Odb) -> Self
Read object payloads from a different ODB (local fetch: remote source, local haves).
Sourcepub fn haves(self, haves: &[ObjectId]) -> Self
pub fn haves(self, haves: &[ObjectId]) -> Self
Objects already held by the peer (negotiation boundary).
Sourcepub fn have_shallow_grafts(self, grafts: &HashSet<ObjectId>) -> Self
pub fn have_shallow_grafts(self, grafts: &HashSet<ObjectId>) -> Self
Shallow grafts on the have side (local fetch).
Sourcepub fn source_shallow_grafts(self, grafts: &HashSet<ObjectId>) -> Self
pub fn source_shallow_grafts(self, grafts: &HashSet<ObjectId>) -> Self
Shallow grafts on the source side (do not walk past on source).
Sourcepub fn progress<F>(self, f: F) -> Selfwhere
F: FnMut(PackProgress) + 'static,
pub fn progress<F>(self, f: F) -> Selfwhere
F: FnMut(PackProgress) + 'static,
Optional progress callback.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PackObjects<'a>
impl<'a> !Send for PackObjects<'a>
impl<'a> !Sync for PackObjects<'a>
impl<'a> !UnwindSafe for PackObjects<'a>
impl<'a> Freeze for PackObjects<'a>
impl<'a> Unpin for PackObjects<'a>
impl<'a> UnsafeUnpin for PackObjects<'a>
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