gix_protocol/fetch/
mod.rs

1/// A module providing low-level primitives to flexibly perform various `fetch` related activities. Note that the typesystem isn't used
2/// to assure they are always performed in the right order, the caller has to follow some parts of the protocol itself.
3///
4/// ### Order for receiving a pack
5///
6/// * [handshake](handshake())
7/// * **ls-refs**
8///     * [get available refs by refspecs](RefMap::new())
9/// * **fetch pack**
10///     * `negotiate` until a pack can be received (TBD)
11/// * [officially terminate the connection](crate::indicate_end_of_interaction())
12///     - Consider wrapping the transport in [`SendFlushOnDrop`](crate::SendFlushOnDrop) to be sure the connection is terminated
13///       gracefully even if there is an application error.
14///
15/// Note that this flow doesn't involve actually writing the pack, or indexing it. Nor does it contain machinery
16/// to write or update references based on the fetched remote references.
17///
18/// Also, when the server supports [version 2](crate::transport::Protocol::V2) of the protocol, then each of the listed commands,
19/// `ls-refs` and `fetch` can be invoked multiple times in any order.
20// Note: for ease of use, this is tested in `gix` itself. The test-suite here uses a legacy implementation.
21mod arguments;
22pub use arguments::Arguments;
23
24#[cfg(any(feature = "blocking-client", feature = "async-client"))]
25#[cfg(feature = "fetch")]
26mod error;
27#[cfg(any(feature = "blocking-client", feature = "async-client"))]
28#[cfg(feature = "fetch")]
29pub use error::Error;
30///
31pub mod response;
32
33#[cfg(any(feature = "blocking-client", feature = "async-client"))]
34#[cfg(feature = "fetch")]
35pub(crate) mod function;
36
37#[cfg(any(feature = "blocking-client", feature = "async-client"))]
38#[cfg(feature = "handshake")]
39mod handshake;
40#[cfg(any(feature = "blocking-client", feature = "async-client"))]
41#[cfg(feature = "handshake")]
42pub use handshake::upload_pack as handshake;
43
44#[cfg(feature = "fetch")]
45pub mod negotiate;
46
47///
48#[cfg(feature = "fetch")]
49pub mod refmap;
50
51mod types;
52pub use types::*;