pub struct ResponseBuffer {
pub body: Bytes,
pub content_type: Arc<str>,
pub content_encoding: Option<&'static str>,
pub etag: Arc<str>,
pub last_modified: Arc<str>,
pub cache_control: Arc<str>,
pub content_length: Arc<str>,
pub vary_encoding: bool,
pub headers: HeaderMap,
}Fields§
§body: Bytes§content_type: Arc<str>§content_encoding: Option<&'static str>§etag: Arc<str>§last_modified: Arc<str>§cache_control: Arc<str>§content_length: Arc<str>§vary_encoding: boolWhether Vary: Accept-Encoding should be sent (true for all compressible types)
headers: HeaderMapFully-built header block for the 200 response. Precomputed once at route creation so the hot path clones it instead of re-inserting ~13 headers per request. The body is appended by the server (or dropped for HEAD).
Implementations§
Trait Implementations§
Source§impl Clone for ResponseBuffer
impl Clone for ResponseBuffer
Source§fn clone(&self) -> ResponseBuffer
fn clone(&self) -> ResponseBuffer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for ResponseBuffer
impl RefUnwindSafe for ResponseBuffer
impl Send for ResponseBuffer
impl Sync for ResponseBuffer
impl Unpin for ResponseBuffer
impl UnsafeUnpin for ResponseBuffer
impl UnwindSafe for ResponseBuffer
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,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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