Skip to main content

Shape

Trait Shape 

Source
pub trait Shape<'req>: Sized {
    type StreamInner: 'static;

    // Required method
    fn prepare(
        self,
        mode: Preparation,
        gzip: Option<&mut Gzip>,
        out: &mut [u8],
        date: &[u8; 29],
    ) -> Prepared<Self::StreamInner>;

    // Provided method
    fn response_view(&self) -> Option<ResponseView> { ... }
}

Required Associated Types§

Source

type StreamInner: 'static

Required Methods§

Source

fn prepare( self, mode: Preparation, gzip: Option<&mut Gzip>, out: &mut [u8], date: &[u8; 29], ) -> Prepared<Self::StreamInner>

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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

Source§

impl<'req, S> Shape<'req> for Stream<S>
where S: 'static,

Source§

impl<'req, const N: usize> Shape<'req> for FixedResponse<'req, N>

Source§

impl<'req, const N: usize> Shape<'req> for MonoResponseInner<'req, N>

Source§

impl<'req, const N: usize> Shape<'req> for Serve<'req, N>

Source§

impl<'req, const N: usize> Shape<'req> for StaticResponseInner<'req, N>

Source§

impl<'req> Shape<'req> for Chunked