pub enum ProxyResponseBody {
Bytes(Bytes),
Empty,
}Expand description
The body of a proxy response.
Only used for responses the handler constructs directly (errors, LIST XML,
multipart XML responses, HEAD metadata). Streaming GET/PUT bodies bypass this type
entirely via the Forward action.
Variants§
Bytes(Bytes)
Fixed bytes (error XML, list XML, multipart XML responses, etc.).
Empty
Empty body (HEAD responses, etc.).
Implementations§
Source§impl ProxyResponseBody
impl ProxyResponseBody
Sourcepub fn from_bytes(bytes: Bytes) -> Self
pub fn from_bytes(bytes: Bytes) -> Self
Create a response body from raw bytes.
Auto Trait Implementations§
impl !Freeze for ProxyResponseBody
impl RefUnwindSafe for ProxyResponseBody
impl Send for ProxyResponseBody
impl Sync for ProxyResponseBody
impl Unpin for ProxyResponseBody
impl UnsafeUnpin for ProxyResponseBody
impl UnwindSafe for ProxyResponseBody
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 more