#[non_exhaustive]pub enum LoadedRequestBody {
NotNeeded,
Requested,
Loaded(Bytes),
}
Available on crate feature
client
only.Expand description
Informs the orchestrator on whether or not the request body needs to be loaded into memory before transmit.
This enum gets placed into the ConfigBag
to change the orchestrator behavior.
Immediately after serialization (before the read_after_serialization
interceptor hook),
if it was set to Requested
in the config bag, it will be replaced back into the config bag as
Loaded
with the request body contents for use in later interceptors.
This all happens before the attempt loop, so the loaded request body will remain available for interceptors that run in any subsequent retry attempts.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotNeeded
Don’t attempt to load the request body into memory.
Requested
Attempt to load the request body into memory.
Loaded(Bytes)
The request body is already loaded.
Trait Implementations§
source§impl Clone for LoadedRequestBody
impl Clone for LoadedRequestBody
source§fn clone(&self) -> LoadedRequestBody
fn clone(&self) -> LoadedRequestBody
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LoadedRequestBody
impl Debug for LoadedRequestBody
source§impl Storable for LoadedRequestBody
impl Storable for LoadedRequestBody
§type Storer = StoreReplace<LoadedRequestBody>
type Storer = StoreReplace<LoadedRequestBody>
Specify how an item is stored in the config bag, e.g.
StoreReplace
and StoreAppend
Auto Trait Implementations§
impl !Freeze for LoadedRequestBody
impl RefUnwindSafe for LoadedRequestBody
impl Send for LoadedRequestBody
impl Sync for LoadedRequestBody
impl Unpin for LoadedRequestBody
impl UnwindSafe for LoadedRequestBody
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.