gix_protocol::fetch

Struct NegotiateContext

Source
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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T