Function git_protocol::fetch [−][src]
pub fn fetch<F, D, T>(
transport: T,
delegate: D,
authenticate: F,
progress: impl Progress,
fetch_mode: FetchConnection
) -> Result<(), Error> where
F: FnMut(Action<'_>) -> Result,
D: Delegate,
T: Transport,
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.
Note that depending on the delegate
, the actual action performed can be ls-refs
, clone
or fetch
.