#[non_exhaustive]
pub struct ConnectionPoisoningInterceptor {}
Available on crate feature client
only.
Expand description
An interceptor for poisoning connections in response to certain events.
This interceptor, when paired with a compatible connection, allows the connection to be
poisoned in reaction to certain events (like receiving a transient error.) This allows users
to avoid sending requests to a server that isn’t responding. This can increase the load on a
server, because more connections will be made overall.
In order for this interceptor to work, the configured connection must interact with the
“connection retriever” stored in an HTTP request’s extensions
map. For an example of this,
see HyperConnector
. When a connection is made available to the retriever, this interceptor
will call a .poison
method on it, signalling that the connection should be dropped. It is
up to the connection implementer to handle this.
Create a new ConnectionPoisoningInterceptor
.
Formats the value using the given formatter.
Read more
Returns the “default value” for a type.
Read more
The name of this interceptor, used in error messages for debugging.
A hook called before the transport request message is sent to the
service. This method has the ability to modify and return
a new transport request message of the same type.
Read more
A hook called after the transport response message is unmarshalled.
Read more
A hook called at the start of an execution, before the SDK
does anything else.
Read more
A hook called before the input message is marshalled into a
transport message.
This method has the ability to modify and return a new
request message of the same type.
Read more
A hook called before the input message is marshalled
into a transport
message.
Read more
A hook called after the input message is marshalled into
a transport message.
Read more
A hook called before the retry loop is entered. This method
has the ability to modify and return a new transport request
message of the same type, except when a failure occurs earlier in the request pipeline.
Read more
A hook called before each attempt at sending the transmission
request message to the service.
Read more
A hook called before the transport request message is signed.
This method has the ability to modify and return a new transport
request message of the same type.
Read more
A hook called before the transport request message is signed.
Read more
A hook called after the transport request message is signed.
Read more
A hook called before the transport request message is sent to the
service.
Read more
A hook called after the transport request message is sent to the
service and a transport response message is received.
Read more
A hook called before the transport response message is unmarshalled.
This method has the ability to modify and return a new transport
response message of the same type.
Read more
A hook called before the transport response message is unmarshalled
Read more
A hook called when an attempt is completed. This method has the
ability to modify and return a new output message or error
matching the currently-executing operation.
Read more
A hook called when an attempt is completed.
Read more
A hook called when an execution is completed.
This method has the ability to modify and return a new
output message or error matching the currently - executing
operation.
Read more
A hook called when an execution is completed.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Instruments this type with the provided
Span
, returning an
Instrumented
wrapper.
Read more
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
Creates a shared type from an unshared type.
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.