pub struct FixedResponse<'req, const N: usize = DEFAULT_HEADER_CAPACITY> { /* private fields */ }Implementations§
Source§impl<'req, const N: usize> FixedResponse<'req, N>
impl<'req, const N: usize> FixedResponse<'req, N>
pub fn direct<B>( status: StatusCode, static_headers: &'static [u8], headers: Headers<'req, N>, body: B, ) -> Self
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> Clone for FixedResponse<'req, N>
impl<'req, const N: usize> Clone for FixedResponse<'req, N>
Source§fn clone(&self) -> FixedResponse<'req, N>
fn clone(&self) -> FixedResponse<'req, N>
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> Debug for FixedResponse<'req, N>
impl<'req, const N: usize> Debug for FixedResponse<'req, N>
Source§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> From<FixedResponse<'static, N>> for Response
impl<const N: usize> From<FixedResponse<'static, N>> for Response
Source§fn from(response: FixedResponse<'static, N>) -> Self
fn from(response: FixedResponse<'static, N>) -> Self
Converts to this type from the input type.
Source§impl<'req, const N: usize> Shape<'req> for FixedResponse<'req, N>
impl<'req, const N: usize> Shape<'req> for FixedResponse<'req, N>
type StreamInner = NeverStream
fn prepare( self, mode: Preparation, gzip: Option<&mut Gzip>, out: &mut [u8], date: &[u8; 29], ) -> Prepared<Self::StreamInner>
fn response_view(&self) -> Option<ResponseView>
Auto Trait Implementations§
impl<'req, const N: usize = DEFAULT_HEADER_CAPACITY> !RefUnwindSafe for FixedResponse<'req, N>
impl<'req, const N: usize = DEFAULT_HEADER_CAPACITY> !Send for FixedResponse<'req, N>
impl<'req, const N: usize = DEFAULT_HEADER_CAPACITY> !Sync for FixedResponse<'req, N>
impl<'req, const N: usize = DEFAULT_HEADER_CAPACITY> !UnwindSafe for FixedResponse<'req, N>
impl<'req, const N: usize> Freeze for FixedResponse<'req, N>
impl<'req, const N: usize> Unpin for FixedResponse<'req, N>
impl<'req, const N: usize> UnsafeUnpin for FixedResponse<'req, N>
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