Skip to main content

EncodedResponseInner

Struct EncodedResponseInner 

Source
pub struct EncodedResponseInner<'req, B, const N: usize = DEFAULT_HEADER_CAPACITY> { /* private fields */ }

Implementations§

Source§

impl<'req, B, const N: usize> EncodedResponseInner<'req, B, N>
where B: EncodedBody,

Source

pub fn direct( status: StatusCode, static_headers: &'static [u8], headers: HeadersInner<'req, N>, body: B, ) -> Self

Source

pub fn status(&self) -> StatusCode

Source

pub fn wire_headers(&self) -> Shared

Source

pub fn preserialize(&self) -> (Vec<u8>, usize)

Source

pub fn write_into_slice(&self, out: &mut [u8], date: &[u8; 29]) -> Option<usize>

Source

pub fn write_head_split( self, out: &mut [u8], date: &[u8; 29], ) -> Option<(usize, Shared)>

Trait Implementations§

Source§

impl<'req, B, const N: usize> Shape<'req> for EncodedResponseInner<'req, B, N>
where B: EncodedBody,

Source§

type StreamInner = NeverStream

Source§

fn write_into_slice(&self, out: &mut [u8], date: &[u8; 29]) -> Option<usize>

Source§

fn write_head_split( self, out: &mut [u8], date: &[u8; 29], ) -> Option<(usize, Shared)>

Source§

fn preserialize(&self) -> (Vec<u8>, usize)

Source§

fn status(&self) -> StatusCode

Source§

fn headers_wire(&self) -> Shared

Source§

fn write_head_only( &self, out: &mut [u8], date: &[u8; 29], ) -> Option<(usize, &'static [u8])>

Source§

fn preserialize_static(&self) -> Option<(Vec<u8>, usize, &'static [u8])>

Source§

fn write_head_stream( self, out: &mut [u8], date: &[u8; 29], ) -> Option<(usize, Self::StreamInner)>

Source§

fn body_for_gzip(&self) -> Option<&[u8]>

Source§

fn write_gzip_head( self, out: &mut [u8], date: &[u8; 29], body_len: usize, ) -> Option<usize>

Source§

fn body_bytes(&self) -> &[u8]

Auto Trait Implementations§

§

impl<'req, B, const N: usize = DEFAULT_HEADER_CAPACITY> !RefUnwindSafe for EncodedResponseInner<'req, B, N>

§

impl<'req, B, const N: usize = DEFAULT_HEADER_CAPACITY> !Send for EncodedResponseInner<'req, B, N>

§

impl<'req, B, const N: usize = DEFAULT_HEADER_CAPACITY> !Sync for EncodedResponseInner<'req, B, N>

§

impl<'req, B, const N: usize = DEFAULT_HEADER_CAPACITY> !UnwindSafe for EncodedResponseInner<'req, B, N>

§

impl<'req, B, const N: usize> Freeze for EncodedResponseInner<'req, B, N>
where B: Freeze,

§

impl<'req, B, const N: usize> Unpin for EncodedResponseInner<'req, B, N>
where B: Unpin,

§

impl<'req, B, const N: usize> UnsafeUnpin for EncodedResponseInner<'req, B, N>
where B: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.