pub struct FixedResponse<'req, const N: usize = DEFAULT_HEADER_CAPACITY, S = StaticHeaderBytes> { /* private fields */ }Implementations§
Source§impl<'req, const N: usize> FixedResponse<'req, N>
impl<'req, const N: usize> FixedResponse<'req, N>
Source§impl<'req, const N: usize, S> FixedResponse<'req, N, S>where
S: StaticHeaders,
impl<'req, const N: usize, S> FixedResponse<'req, N, S>where
S: StaticHeaders,
pub fn status(&self) -> StatusCode
pub fn body_ref(&self) -> &[u8] ⓘ
pub fn has_content_encoding(&self) -> bool
pub fn wire_headers(&self) -> Shared
pub fn preserialize(&self) -> (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)>
pub fn write_gzip_head( self, out: &mut [u8], date: &[u8; 29], body_len: usize, ) -> Option<usize>
Trait Implementations§
Source§impl<'req, const N: usize, S: Clone> Clone for FixedResponse<'req, N, S>
impl<'req, const N: usize, S: Clone> Clone for FixedResponse<'req, N, S>
Source§fn clone(&self) -> FixedResponse<'req, N, S>
fn clone(&self) -> FixedResponse<'req, N, S>
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 moreSource§impl<'req, const N: usize> From<FixedResponse<'req, N>> for Serve<'req, N>
impl<'req, const N: usize> From<FixedResponse<'req, N>> for Serve<'req, N>
Source§fn from(value: FixedResponse<'req, N>) -> Self
fn from(value: FixedResponse<'req, N>) -> Self
Converts to this type from the input type.
Source§impl<const N: usize, H> From<FixedResponse<'static, N, H>> for Responsewhere
H: StaticHeaders,
impl<const N: usize, H> From<FixedResponse<'static, N, H>> for Responsewhere
H: StaticHeaders,
Source§fn from(response: FixedResponse<'static, N, H>) -> Self
fn from(response: FixedResponse<'static, N, H>) -> Self
Converts to this type from the input type.
Source§impl<'req, const N: usize, S> IntoResponseShape<'req> for FixedResponse<'req, N, S>where
S: StaticHeaders,
impl<'req, const N: usize, S> IntoResponseShape<'req> for FixedResponse<'req, N, S>where
S: StaticHeaders,
type Shape = FixedResponse<'req, N, S>
fn into_response_shape(self) -> Self::Shape
Source§impl<'req, const N: usize, S> Shape<'req> for FixedResponse<'req, N, S>where
S: StaticHeaders,
impl<'req, const N: usize, S> Shape<'req> for FixedResponse<'req, N, S>where
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, const N: usize = DEFAULT_HEADER_CAPACITY, S = StaticHeaderBytes> !RefUnwindSafe for FixedResponse<'req, N, S>
impl<'req, const N: usize = DEFAULT_HEADER_CAPACITY, S = StaticHeaderBytes> !Send for FixedResponse<'req, N, S>
impl<'req, const N: usize = DEFAULT_HEADER_CAPACITY, S = StaticHeaderBytes> !Sync for FixedResponse<'req, N, S>
impl<'req, const N: usize = DEFAULT_HEADER_CAPACITY, S = StaticHeaderBytes> !UnwindSafe for FixedResponse<'req, N, S>
impl<'req, const N: usize, S> Freeze for FixedResponse<'req, N, S>where
S: Freeze,
impl<'req, const N: usize, S> Unpin for FixedResponse<'req, N, S>where
S: Unpin,
impl<'req, const N: usize, S> UnsafeUnpin for FixedResponse<'req, N, S>where
S: UnsafeUnpin,
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