Expand description
An abstraction over fetching a pack from the server.
Generally, there is the following order of operations.
- create a
Transport - perform a
handshake() - execute a
Command- list references
- create a mapping between refspecs and references
- receive a pack
- list references
§Feature Flags
§_Mutually exclusive client _
The client portion of the protocol uses gix-transport to communicate to a server. For it to be available, one of the following features must
be selected.
Specifying both causes a compile error, preventing the use of --all-features.
blocking-client— If set, blocking command implementations are available and will use the blocking version of thegix-transportcrate.async-client— As above, but provides async implementations instead.handshake— Add implementations for performing ahandshakealong with the dependencies needed for it.fetch— Add implementations for performing afetch(for packs) along with the dependencies needed for it.
§Other
serde— Data structures implementserde::Serializeandserde::Deserialize.
Re-exports§
pub use gix_credentials as credentials;handshakepub use gix_transport as transport;pub use maybe_async;
Modules§
- command
- V2 command abstraction to validate invocations and arguments, like a database of what we know about them.
- fetch
- handshake
- ls_refs
Structs§
- Remote
Progress - The information usually found in remote progress messages as sent by a git server during fetch, clone and push operations.
- Send
Flush OnDrop blocking-clientorasync-client - A utility to automatically send a flush packet when the instance is dropped, assuring a graceful termination of any interaction with the server.
Enums§
- Command
- A selector for V2 commands to invoke on the server for purpose of pre-invocation validation.
Functions§
- agent
- The name of the
gitclient in a format suitable for presentation to agitserver, usingnameas user-defined portion of the value. - fetch
blocking-clientorasync-client - Perform one fetch operation, relying on a
transport.negotiateis used to run the negotiation of objects that should be contained in the pack, if one is to be received.progressandshould_interruptis passed to all potentially long-running parts of the operation. - handshake
( blocking-clientorasync-client) andhandshake - Perform a handshake with the server on the other side of
transport, withauthenticatebeing used if authentication turns out to be required.extra_parametersare the parameters(name, optional value)to add to the handshake, each time it is performed in case authentication is required.progressis used to inform about what’s currently happening. - indicate_
end_ of_ interaction blocking-clientorasync-client - Send a message to indicate the remote side that there is nothing more to expect from us, indicating a graceful shutdown.
If
traceistrue, all packetlines received or sent will be passed to the facilities of thegix-tracecrate. - ls_refs
blocking-clientorasync-client - Invoke an ls-refs V2 command on
transport, which requires a prior handshake that yielded servercapabilities.prepare_ls_refs(capabilities, arguments, features)can be used to alter the ls-refs.progressis used to provide feedback. Note thatprepare_ls_refs()is expected to add the(agent, Some(name))to the list offeatures. Iftraceistrue, all packetlines received or sent will be passed to the facilities of thegix-tracecrate.
Type Aliases§
- Authenticate
Fn handshake - A function that performs a given credential action, trying to obtain credentials for an operation that needs it.