gix_protocol::fetch

Trait Negotiate

Source
pub trait Negotiate {
    // Required methods
    fn mark_complete_and_common_ref(&mut self) -> Result<Action, Error>;
    fn add_wants(
        &mut self,
        arguments: &mut Arguments,
        remote_ref_target_known: &[bool],
    ) -> bool;
    fn one_round(
        &mut self,
        state: &mut State,
        arguments: &mut Arguments,
        previous_response: Option<&Response>,
    ) -> Result<(Round, bool), Error>;
}
Available on crate feature fetch only.
Expand description

A trait to encapsulate steps to negotiate the contents of the pack.

Typical implementations use the utilities found in the negotiate module.

Required Methods§

Source

fn mark_complete_and_common_ref(&mut self) -> Result<Action, Error>

Source

fn add_wants( &mut self, arguments: &mut Arguments, remote_ref_target_known: &[bool], ) -> bool

Typically invokes negotiate::add_wants(). Returns true if wants were added, or false if the negotiation should be aborted.

Source

fn one_round( &mut self, state: &mut State, arguments: &mut Arguments, previous_response: Option<&Response>, ) -> Result<(Round, bool), Error>

Typically invokes negotiate::one_round().

Implementors§