Enum git_protocol::FetchConnection[][src]

pub enum FetchConnection {
    TerminateOnSuccessfulCompletion,
    AllowReuse,
}
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 failures 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

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.