Skip to main content

Shape

Trait Shape 

Source
pub trait Shape<'req>: Sized + IntoResponseShape<'req, Shape = Self> {
    type Metadata: ShapeMetadata;

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

    // Provided methods
    fn response_view(&self) -> Option<ResponseView> { ... }
    fn emit<E: ResponseSink>(self, _sink: &mut E) -> bool { ... }
}

Required Associated Types§

Required Methods§

Source

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

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, S> Shape<'req> for EncodedResponse<'req, B, N, S>
where B: EncodedBody, S: StaticHeaders,

Source§

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

Source§

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

Source§

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

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> Shape<'req> for Chunked