Trait git_protocol::fetch::delegate::Delegate[][src]

pub trait Delegate: DelegateBlocking {
    fn receive_pack(
        &mut self,
        input: impl BufRead,
        progress: impl Progress,
        refs: &[Ref],
        previous_response: &Response
    ) -> Result<()>; }
Expand description

The protocol delegate is the bare minimal interface needed to fully control the fetch operation.

Implementations of this trait are controlled by code with intricate knowledge about how fetching works in protocol version V1 and V2, so you don’t have to. Everything is tucked away behind type-safety so ’nothing can go wrong’©. Runtime assertions assure invalid features or arguments don’t make it to the server in the first place. Please note that this trait mostly corresponds to what V2 would look like, even though V1 is supported as well.

Required methods

Receive a pack provided from the given input.

Use progress to emit your own progress messages when decoding the pack.

refs of the remote side are provided for convenience, along with the parsed previous_response response in case you want to check additional acks.

Implementations on Foreign Types

Implementors