pub fn one_round(
negotiator: &mut dyn Negotiator,
graph: &mut Graph<'_, '_>,
state: &mut State,
arguments: &mut Arguments,
previous_response: Option<&Response>,
) -> Result<(Round, bool), Error>
Available on crate feature
fetch
only.Expand description
Prepare to negotiate a single round in the process of letting the remote know what we have, and have in common.
Note that this function only configures arguments
, no IO is performed.
The operation is performed with negotiator
and graph
, sending the amount of haves_to_send
after possibly
making the common commits (as sent by the remote) known to negotiator
using previous_response
, if this isn’t the first round.
All commits we have are added to arguments
accordingly.
Returns information about this round, and true
if we are done and should stop negotiating after the arguments
have
been sent to the remote one last time.