pub enum PayloadKind {
Earliest,
WaitForPending,
}Expand description
Determines how we should choose the payload to return.
Returns the next best available payload (the earliest available payload). This does not wait for a real for pending job to finish if there’s no best payload yet and is allowed to race various payload jobs (empty, pending best) against each other and returns whichever job finishes faster.
This should be used when it’s more important to return a valid payload as fast as possible.
For example, the engine API timeout for engine_getPayload is 1s and clients should rather
return an empty payload than indefinitely waiting for the pending payload job to finish and
risk missing the deadline.
Only returns once we have at least one built payload.
Compared to PayloadKind::Earliest this does not race an empty payload job against the
already in progress one, and returns the best available built payload or awaits the job in
progress.
§
§
Causes self to use its Binary implementation when Debug-formatted.
§
Causes self to use its Display implementation when
Debug-formatted.
§
Causes self to use its LowerExp implementation when
Debug-formatted.
§
Causes self to use its LowerHex implementation when
Debug-formatted.
§
Causes self to use its Octal implementation when Debug-formatted.
§
Causes self to use its Pointer implementation when
Debug-formatted.
§
Causes self to use its UpperExp implementation when
Debug-formatted.
§
Causes self to use its UpperHex implementation when
Debug-formatted.
§
§
Available on crate feature propagate-header only.
Propagate a header from the request to the response. Read more
§
Available on crate feature add-extension only.
§
Available on crate feature map-request-body only.
Apply a transformation to the request body. Read more
§
Available on crate feature map-response-body only.
Apply a transformation to the response body. Read more
§
Available on crate features compression-br or compression-deflate or compression-gzip or compression-zstd only.
Compresses response bodies. Read more
§
Available on crate features decompression-br or decompression-deflate or decompression-gzip or decompression-zstd only.
Decompress response bodies. Read more
§
Available on crate feature trace only.
High level tracing that classifies responses using HTTP status codes. Read more
§
Available on crate feature trace only.
High level tracing that classifies responses using gRPC headers. Read more
§
Available on crate feature follow-redirect only.
Available on crate feature sensitive-headers only.
Available on crate feature sensitive-headers only.
Available on crate feature sensitive-headers only.
Available on crate feature set-header only.
Insert a header into the request, if the header is not already present. Read more
Available on crate feature set-header only.
Insert a header into the response, if the header is not already present. Read more
§
Available on crate feature request-id only.
Add request id header and extension, using x-request-id as the header name. Read more
§
Available on crate feature request-id only.
Propgate request ids from requests to responses. Read more
§
Available on crate feature request-id only.
Propgate request ids from requests to responses, using x-request-id as the header name. Read more
§
Available on crate feature catch-panic only.
Catch panics and convert them into 500 Internal Server responses. Read more
§
§
Calls .tap() only in debug builds, and is erased in release builds.
§
Calls .tap_mut() only in debug builds, and is erased in release
builds.
§
Calls .tap_borrow() only in debug builds, and is erased in release
builds.
§
Calls .tap_borrow_mut() only in debug builds, and is erased in release
builds.
§
Calls .tap_ref() only in debug builds, and is erased in release
builds.
§
Calls .tap_ref_mut() only in debug builds, and is erased in release
builds.
§
Calls .tap_deref() only in debug builds, and is erased in release
builds.
§
Calls .tap_deref_mut() only in debug builds, and is erased in release
builds.
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Earliest: 0 bytesWaitForPending: 0 bytes