Enum gix_protocol::FetchConnection
source · pub enum FetchConnection {
TerminateOnSuccessfulCompletion,
AllowReuse,
}
blocking-client
or async-client
only.Expand description
A way to indicate how to treat the connection underlying the transport, potentially allowing to reuse it.
Variants§
TerminateOnSuccessfulCompletion
Use this variant if server should be informed that the operation is completed and no further commands will be issued at the end of the fetch operation or after deciding that no fetch operation should happen after references were listed.
When indicating the end-of-fetch, this flag is only relevant in protocol V2. Generally it only applies when using persistent transports.
In most explicit client side failure modes the end-of-operation’ notification will be sent to the server automatically.
AllowReuse
Indicate that persistent transport connections can be reused by not sending an ‘end-of-operation’ notification to the server.
This is useful if multiple fetch(…)
calls are used in succession.
Note that this has no effect in case of non-persistent connections, like the ones over HTTP.
As an optimization, callers can use AllowReuse
here as the server will also know the client is done
if the connection is closed.
Trait Implementations§
source§impl Clone for FetchConnection
impl Clone for FetchConnection
source§fn clone(&self) -> FetchConnection
fn clone(&self) -> FetchConnection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FetchConnection
impl Debug for FetchConnection
source§impl Default for FetchConnection
impl Default for FetchConnection
source§fn default() -> FetchConnection
fn default() -> FetchConnection
source§impl Hash for FetchConnection
impl Hash for FetchConnection
source§impl PartialEq for FetchConnection
impl PartialEq for FetchConnection
source§fn eq(&self, other: &FetchConnection) -> bool
fn eq(&self, other: &FetchConnection) -> bool
self
and other
values to be equal, and is used
by ==
.