Function gix_protocol::fetch
source · pub fn fetch<F, D, T, P>(
transport: T,
delegate: D,
authenticate: F,
progress: P,
fetch_mode: FetchConnection,
agent: impl Into<String>,
trace: bool
) -> Result<(), Error>where
F: FnMut(Action) -> Result,
D: Delegate,
T: Transport,
P: NestedProgress + 'static,
P::SubProgress: 'static,
Available on crate features
blocking-client
or async-client
only.Expand description
Perform a ‘fetch’ operation with the server using transport
, with delegate
handling all server interactions.
Note that delegate
has blocking operations and thus this entire call should be on an executor which can handle
that. This could be the current thread blocking, or another thread.
authenticate(operation_to_perform)
is used to receive credentials for the connection and potentially store it if the server indicates ‘permission denied’. Note that not all transport support authentication or authorization.progress
is used to emit progress messages.name
is the name of the git client to present asagent
, like"my-app (v2.0)"
“.- If
trace
istrue
, all packetlines received or sent will be passed to the facilities of thegix-trace
crate.
Note that depending on the delegate
, the actual action performed can be ls-refs
, clone
or fetch
.
§WARNING - Do not use!
As it will hang when having multiple negotiation rounds.