pub struct EncodedResponse<'req, B, const N: usize = DEFAULT_HEADER_CAPACITY, S = StaticHeaderBytes> { /* private fields */ }Implementations§
Source§impl<'req, B, const N: usize> EncodedResponse<'req, B, N>where
B: EncodedBody,
impl<'req, B, const N: usize> EncodedResponse<'req, B, N>where
B: EncodedBody,
pub fn direct( status: StatusCode, static_headers: &'static [u8], headers: Headers<'req, N>, body: B, ) -> Self
Source§impl<'req, B, const N: usize, S> EncodedResponse<'req, B, N, S>where
B: EncodedBody,
S: StaticHeaders,
impl<'req, B, const N: usize, S> EncodedResponse<'req, B, N, S>where
B: EncodedBody,
S: StaticHeaders,
pub fn status(&self) -> StatusCode
pub fn wire_headers(&self) -> Shared
pub fn preserialize(&self) -> Option<(Vec<u8>, usize)>
pub fn write_into_slice(&self, out: &mut [u8], date: &[u8; 29]) -> Option<usize>
pub fn write_head_split( self, out: &mut [u8], date: &[u8; 29], ) -> Option<(usize, Shared)>
Trait Implementations§
Source§impl<'req, B, const N: usize, S> IntoResponseShape<'req> for EncodedResponse<'req, B, N, S>where
B: EncodedBody,
S: StaticHeaders,
impl<'req, B, const N: usize, S> IntoResponseShape<'req> for EncodedResponse<'req, B, N, S>where
B: EncodedBody,
S: StaticHeaders,
type Shape = EncodedResponse<'req, B, N, S>
fn into_response_shape(self) -> Self::Shape
Source§impl<'req, B, const N: usize, S> Shape<'req> for EncodedResponse<'req, B, N, S>where
B: EncodedBody,
S: StaticHeaders,
impl<'req, B, const N: usize, S> Shape<'req> for EncodedResponse<'req, B, N, S>where
B: EncodedBody,
S: StaticHeaders,
type Metadata = InlineShape
fn prepare( self, mode: Preparation, _gzip: Option<&mut Gzip>, out: &mut [u8], date: &[u8; 29], ) -> Prepared<<Self::Metadata as ShapeMetadata>::Stream>
fn response_view(&self) -> Option<ResponseView>
fn emit<E: ResponseSink>(self, sink: &mut E) -> bool
Auto Trait Implementations§
impl<'req, B, const N: usize = DEFAULT_HEADER_CAPACITY, S = StaticHeaderBytes> !RefUnwindSafe for EncodedResponse<'req, B, N, S>
impl<'req, B, const N: usize = DEFAULT_HEADER_CAPACITY, S = StaticHeaderBytes> !Send for EncodedResponse<'req, B, N, S>
impl<'req, B, const N: usize = DEFAULT_HEADER_CAPACITY, S = StaticHeaderBytes> !Sync for EncodedResponse<'req, B, N, S>
impl<'req, B, const N: usize = DEFAULT_HEADER_CAPACITY, S = StaticHeaderBytes> !UnwindSafe for EncodedResponse<'req, B, N, S>
impl<'req, B, const N: usize, S> Freeze for EncodedResponse<'req, B, N, S>
impl<'req, B, const N: usize, S> Unpin for EncodedResponse<'req, B, N, S>
impl<'req, B, const N: usize, S> UnsafeUnpin for EncodedResponse<'req, B, N, S>
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