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 more