pub struct NegotiateContext<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find>where
Objects: Find + FindHeader + Exists,
Alternates: FnOnce() -> Result<AlternatesOut, AlternatesErr>,
AlternatesErr: Into<Box<dyn Error + Send + Sync + 'static>>,
AlternatesOut: Iterator<Item = (Store, Find)>,
Find: Find,{
pub objects: &'a Objects,
pub refs: &'a Store,
pub alternates: Alternates,
pub negotiator: &'a mut dyn Negotiator,
pub graph: &'a mut Graph<'b, 'c>,
}
Available on crate feature
fetch
only.Expand description
For use in fetch
.
Fields§
§objects: &'a Objects
Access to the object database.
Note that the exists()
calls must not trigger a refresh of the ODB packs as plenty of them might fail, i.e. find on object.
refs: &'a Store
Access to the git references database.
alternates: Alternates
A function that returns an iterator over (refs, objects)
for each alternate repository, to assure all known objects are added also according to their tips.
negotiator: &'a mut dyn Negotiator
The implementation that performs the negotiation later, i.e. prepare wants and haves.
graph: &'a mut Graph<'b, 'c>
The commit-graph for use by the negotiator
- we populate it with tips to initialize the graph traversal.
Auto Trait Implementations§
impl<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find> Freeze for NegotiateContext<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find>where
Alternates: Freeze,
impl<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find> !RefUnwindSafe for NegotiateContext<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find>
impl<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find> !Send for NegotiateContext<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find>
impl<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find> !Sync for NegotiateContext<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find>
impl<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find> Unpin for NegotiateContext<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find>where
Alternates: Unpin,
impl<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find> !UnwindSafe for NegotiateContext<'a, 'b, 'c, Objects, Alternates, AlternatesOut, AlternatesErr, Find>
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