Enum ErrorReason
#[non_exhaustive]#[repr(i32)]pub enum ErrorReason {
Unknown = 0,
FieldInvalid = 1,
FieldMissing = 2,
InsufficientGasBalance = 3,
TransactionExecutionFailed = 4,
AboveLatestAvailable = 5,
BelowEarliestAvailable = 6,
ObjectRemoved = 7,
NotServedHere = 8,
NotReady = 9,
VersionNotRetained = 10,
}Expand description
Error reasons in the sui.io error domain, used as the reason of a
google.rpc.ErrorInfo or of a google.rpc.BadRequest.FieldViolation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown = 0
FieldInvalid = 1
FieldMissing = 2
InsufficientGasBalance = 3
Gas selection could not find enough SUI to cover the gas budget.
SimulateTransaction returns this with INVALID_ARGUMENT. Gas selection
runs only when do_gas_selection is set, checks is not DISABLED, and
the transaction has no gas payment objects. When the server estimates the
budget and the transaction fails in that estimation, SimulateTransaction
returns TRANSACTION_EXECUTION_FAILED instead of this error, so with an
estimated budget this reason means the transaction executed successfully
in simulation.
Example of an ErrorInfo when the gas owner holds a single 2246360 MIST coin, has no address balance, and the transaction needs a budget of 8924024 MIST:
{ "reason": "INSUFFICIENT_GAS_BALANCE",
"domain": "sui.io",
"metadata": {
"owner": "0x0000000000000000000000000000000000000000000000000000000000000123",
"requiredBudget": "8924024",
"coinBalance": "2246360",
"addressBalance": "0"
}
}Metadata, with amounts in MIST as decimal strings:
owner: the gas owner’s address, as “0x” followed by 64 hex digits.requiredBudget: the gas budget the transaction needs. When the request leaves the budget unset, this is the server’s estimate plus the cost of loading every coin counted incoinBalancebeyond the first; otherwise it is the budget from the request. An estimatedrequiredBudgetdepends on how many coins the gas owner holds: when the owner already holds coins, sending it a new coin raisesrequiredBudgetby up to the cost of loading one more coin. A new coin worthrequiredBudgetcovers that increase unlesscoinBalanceis less than the cost of loading one coin; a new coin worth onlyrequiredBudgetminuscoinBalancecan fall short.coinBalance: total of the gas owner’sCoin<SUI>objects considered by gas selection: owned, non-consensus coins not already used as transaction inputs, largest first, up to the protocol’s maximum number of gas payment objects.addressBalance: the gas owner’s SUI address balance remaining after the transaction’s own explicit SUI withdrawals from the gas owner; “0” if there is none.
The two balances are reported separately because they combine
differently. When the transaction uses the gas coin (an Argument of kind
GAS), coins and address balance are combined to pay for gas. Otherwise
they are never combined: the address balance pays for gas only if it
alone covers the budget before coin-loading costs, which is at most
requiredBudget; if it does not, the coins alone must cover
requiredBudget.
TransactionExecutionFailed = 4
The transaction failed while executing in simulation. SimulateTransaction
returns this with INVALID_ARGUMENT when it estimates the budget, the
transaction fails in that estimation, and gas selection then cannot cover
the budget. It is returned instead of the INSUFFICIENT_GAS_BALANCE
reason in that case because the transaction fails even with its gas paid
for, so the gas budget is not what stops it; kind says what does. Some
kinds can still be fixed by adding funds: for example,
INSUFFICIENT_FUNDS_FOR_WITHDRAW means a balance the transaction
withdraws from holds too little. INSUFFICIENT_GAS cannot: the estimation
runs with the maximum gas budget, so it means the transaction needs more
gas than any budget allows. A gas owner that can cover the budget instead
gets a successful response whose effects.status.error describes the
failure.
The status details also carry the ExecutionError, in the same form as
effects.status.error.
Example of an ErrorInfo for a Move abort in the first command:
{ "reason": "TRANSACTION_EXECUTION_FAILED",
"domain": "sui.io",
"metadata": {
"kind": "MOVE_ABORT",
"command": "0"
}
}Metadata:
kind: the failure’sExecutionError.ExecutionErrorKindname.command: index of the command that failed, as a decimal string, or “” if no single command failed.
AboveLatestAvailable = 5
The request reads ledger data above what this server has indexed. The
LedgerService ListCheckpoints, ListTransactions and ListEvents
RPCs return this with OUT_OF_RANGE for a descending query when its
end_checkpoint, which is exclusive, is above
firstUnavailableCheckpoint; when, with end_checkpoint unset, its
start_checkpoint is at or above firstUnavailableCheckpoint; or when
its range reaches the latest indexed checkpoint (end_checkpoint unset
or above firstUnavailableCheckpoint) and its before or after cursor
names a position this server has not indexed. An ascending query never
gets this error for its cursors or checkpoint range. Its range ends at
the latest indexed checkpoint, and when the range reaches it, an after
cursor past it ends an empty response with LEDGER_TIP at the position
that cursor resumes from.
Such a cursor comes from a newer view of the ledger than this server’s,
for example from another replica behind the same load balancer. The data
is not indexed here yet, so the same request becomes servable once this
server catches up, and a client may resend it unchanged after a delay. A
cursor comes from a server that had indexed its position, so a request
rejected for its cursor (bound is “cursor”) is servable within the time
replicas take to catch up with each other. Any other bound names a
checkpoint the caller chose, which the chain may not have reached.
Requests pinned to a checkpoint by at_checkpoint return this with
OUT_OF_RANGE when that checkpoint is above the latest indexed
checkpoint.
BatchGetObjects reports it only for the item with that at_checkpoint.
ListPackageVersions follows these rules for its checkpoint range and
cursors; see ListPackageVersionsRequest.options. When it refuses a
cursor for the version the cursor names, requestedCheckpoint is
firstUnavailableCheckpoint; for a cursor from the listing of every
package, it is the publish checkpoint the cursor names.
ListObjectVersions follows these rules for its checkpoint range and
cursors; see ListObjectVersionsRequest.
Example of an ErrorInfo for a descending query’s before cursor at
checkpoint 1205, sent to a server whose latest indexed checkpoint is 1199:
{ "reason": "ABOVE_LATEST_AVAILABLE",
"domain": "sui.io",
"metadata": {
"bound": "cursor",
"requestedCheckpoint": "1205",
"firstUnavailableCheckpoint": "1200"
}
}Metadata, with checkpoints as decimal strings:
bound: what reads above the indexed data: “cursor” for abeforeoraftercursor, or the name of the request field, such as “start_checkpoint”, “end_checkpoint” or “at_checkpoint”.requestedCheckpoint: the checkpoint recorded in the cursor, or the value of the request field. For aListObjectVersionscursor refused by its version, it isfirstUnavailableCheckpoint; forListObjectVersionscursors refused by the checkpoints they record, it is the lowest of those checkpoints.firstUnavailableCheckpoint: the lowest checkpoint this server has not indexed, one above its latest indexed checkpoint, or “0” if it has indexed none.
BelowEarliestAvailable = 6
The request needs ledger data this server has pruned. The LedgerService
ListCheckpoints, ListTransactions and ListEvents RPCs return this
with OUT_OF_RANGE when the start of their scan, set by
start_checkpoint or an after cursor, whichever is later, is below the
lowest checkpoint this server serves; when a request with neither has a
non-empty checkpoint range that ends at or below that checkpoint, or a
before cursor at or below it; when a descending query with no lower
bound of its own reaches it; or when the server prunes data a query has
not read yet. A descending query that reaches the lowest checkpoint fails
after it streams every item at or above that checkpoint, and its last
response carries a watermark at that checkpoint.
GetCheckpoint, GetTransaction and BatchGetTransactions (for each
item) return this with OUT_OF_RANGE for a checkpoint, or a transaction
in a checkpoint, that the server can place below the lowest checkpoint it
serves; see their request docs. So do point reads whose request docs say
so.
Requests pinned to a checkpoint by at_checkpoint return this with
OUT_OF_RANGE when that checkpoint is below the lowest checkpoint this
server serves.
BatchGetObjects reports it only for the item with that at_checkpoint.
GetPackage also returns this with OUT_OF_RANGE for a version this
server has pruned.
ListPackageVersions also returns this with OUT_OF_RANGE on servers
that prune history; see ListPackageVersionsRequest. Its
lowestAvailableCheckpoint is the lowest start_checkpoint it accepts.
ListObjectVersions returns this with OUT_OF_RANGE on servers that
prune history; see ListObjectVersionsRequest. Its
lowestAvailableCheckpoint is the lowest start_checkpoint the server
accepts.
Pruned data does not come back, so the same request fails the same way
on this server. A client can send it to a server that retains the data,
or resume at or above lowestAvailableCheckpoint.
Example of an ErrorInfo from a server whose lowest available checkpoint is 5000:
{ "reason": "BELOW_EARLIEST_AVAILABLE",
"domain": "sui.io",
"metadata": {
"lowestAvailableCheckpoint": "5000"
}
}Metadata, as decimal strings:
lowestAvailableCheckpoint: the lowest checkpoint this server serves.
ObjectRemoved = 7
The object was deleted or wrapped at the version a GetObject request, or
a BatchGetObjects item, resolved to (see GetObjectRequest). Reported
with NOT_FOUND. Best effort: a server that cannot find the removal, for
example because it pruned it or keeps no record of removals, answers
NOT_FOUND without this reason, so its absence does not mean the object
never existed. A removal written after the request’s at_checkpoint is
not visible to it. The object can come back at a higher version, by an
unwrap or by being created again under the same ID; the error describes
only the version the request resolved to. To find the transaction that
removed it, call ListObjectVersions with start_version set to
removedVersion, end_version one above it, and transaction in
removal_read_mask.
Example of an ErrorInfo for an object deleted at version 42:
{ "reason": "OBJECT_REMOVED",
"domain": "sui.io",
"metadata": {
"removedVersion": "42",
"removalKind": "DELETED"
}
}Metadata:
removedVersion: the removal’s version, as a decimal string.removalKind:DELETEDorWRAPPED, anObjectRemoval.Kindname.
NotServedHere = 8
This server is not set up for the method, or for this kind of request on
a method it otherwise serves, for example a read at a checkpoint
(GetObject with at_checkpoint) on a server without RPC indexes.
Returned with UNIMPLEMENTED. The same request to the same server always
fails the same way: do not retry it there, send it to a server configured
to serve it. UNIMPLEMENTED without this reason comes from a server that
lacks the method, predates this reason, or does not attach it.
Example of an ErrorInfo from a server without RPC indexes:
{ "reason": "NOT_SERVED_HERE",
"domain": "sui.io",
"metadata": {
"cause": "no_rpc_indexes"
}
}Metadata:
cause: what this server lacks: “no_rpc_indexes” (it does not keep the RPC indexes the request needs) or “disabled_by_config” (its configuration turns the method or this kind of request off).
NotReady = 9
This server cannot serve the request now but will be able to, for example
while it starts or backfills history. Returned with UNAVAILABLE. Retry,
preferably on another replica.
Example of an ErrorInfo from a server backfilling history restored from a snapshot:
{ "reason": "NOT_READY",
"domain": "sui.io",
"metadata": {
"cause": "restore_backfill"
}
}Metadata:
cause: the temporary state that stops the server, such as “index_empty” (its index holds no data yet), “restore_backfill” (it is backfilling history restored from a snapshot) or “history_catching_up” (its indexes trail its live state). More causes may be added.
VersionNotRetained = 10
The request needs an older version of an object that this server no
longer holds: the server keeps only the latest version of each object,
and a newer version has replaced the one requested. Returned with
OUT_OF_RANGE, for example by GetObject with a version below the
object’s latest version and no at_checkpoint.
The server has no checkpoint below which data is gone, so the error
carries no lowestAvailableCheckpoint. The version does not come back,
so the same request fails the same way on this server. A server that
keeps every version of each object, such as kv-rpc, may serve it.
Example of an ErrorInfo for GetObject with version 5 of an object
whose latest version on this server is 8:
{ "reason": "VERSION_NOT_RETAINED",
"domain": "sui.io"
}It carries no metadata.
Implementations§
§impl ErrorReason
impl ErrorReason
§impl ErrorReason
impl ErrorReason
pub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn from_str_name(value: &str) -> Option<ErrorReason>
pub fn from_str_name(value: &str) -> Option<ErrorReason>
Creates an enum from field names used in the ProtoBuf definition.
§impl ErrorReason
impl ErrorReason
Trait Implementations§
§impl AsRef<str> for ErrorReason
impl AsRef<str> for ErrorReason
§impl Clone for ErrorReason
impl Clone for ErrorReason
§fn clone(&self) -> ErrorReason
fn clone(&self) -> ErrorReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ErrorReason
§impl Debug for ErrorReason
impl Debug for ErrorReason
§impl Default for ErrorReason
impl Default for ErrorReason
§fn default() -> ErrorReason
fn default() -> ErrorReason
§impl<'de> Deserialize<'de> for ErrorReason
impl<'de> Deserialize<'de> for ErrorReason
§fn deserialize<D>(
deserializer: D,
) -> Result<ErrorReason, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ErrorReason, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
impl Eq for ErrorReason
§impl From<ErrorReason> for i32
impl From<ErrorReason> for i32
§fn from(value: ErrorReason) -> i32
fn from(value: ErrorReason) -> i32
§impl Hash for ErrorReason
impl Hash for ErrorReason
§impl Ord for ErrorReason
impl Ord for ErrorReason
§fn cmp(&self, other: &ErrorReason) -> Ordering
fn cmp(&self, other: &ErrorReason) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for ErrorReason
impl PartialEq for ErrorReason
§impl PartialOrd for ErrorReason
impl PartialOrd for ErrorReason
§impl Serialize for ErrorReason
impl Serialize for ErrorReason
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl StructuralPartialEq for ErrorReason
§impl TryFrom<i32> for ErrorReason
impl TryFrom<i32> for ErrorReason
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
§fn try_from(value: i32) -> Result<ErrorReason, UnknownEnumValue>
fn try_from(value: i32) -> Result<ErrorReason, UnknownEnumValue>
Auto Trait Implementations§
impl Freeze for ErrorReason
impl RefUnwindSafe for ErrorReason
impl Send for ErrorReason
impl Sync for ErrorReason
impl Unpin for ErrorReason
impl UnsafeUnpin for ErrorReason
impl UnwindSafe for ErrorReason
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
U: Sized,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
U: Sized,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Conv for T
impl<T> Conv for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
fn from_bcs<'de>(bytes: &'de [u8]) -> Result<Self, Error>where
Self: Deserialize<'de>,
fn from_bcs_base64(base64: &str) -> Result<Self, Error>where
Self: DeserializeOwned,
§impl<T> InitializableFromZeroed for Twhere
T: Default,
impl<T> InitializableFromZeroed for Twhere
T: Default,
§unsafe fn initialize(place: *mut T)
unsafe fn initialize(place: *mut T)
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a Request§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<I> IntoResettable<String> for I
impl<I> IntoResettable<String> for I
§fn into_resettable(self) -> Resettable<String>
fn into_resettable(self) -> Resettable<String>
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].impl<T> MaybeSendSync for T
impl<N> NodeTrait for N
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Sequence for T
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
§fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
§fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
§fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
§fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
§fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
§fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
§fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
§fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
§fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
§fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
§fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
x-request-id as the header name. Read more§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
x-request-id as the header name. Read more§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
500 Internal Server responses. Read more§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
413 Payload Too Large responses. Read more§fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
§fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.