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
impl Copy for FetchConnection
impl Eq for FetchConnection
impl StructuralPartialEq for FetchConnection
Auto Trait Implementations§
impl Freeze for FetchConnection
impl RefUnwindSafe for FetchConnection
impl Send for FetchConnection
impl Sync for FetchConnection
impl Unpin for FetchConnection
impl UnwindSafe for FetchConnection
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)