pub trait Shape<'req>: Sized {
type StreamInner: Future<Output = Option<Shared>> + 'static;
// Provided methods
fn write_into_slice(&self, out: &mut [u8], date: &[u8; 29]) -> Option<usize> { ... }
fn preserialize(&self) -> (Vec<u8>, usize) { ... }
fn write_head_only(
&self,
out: &mut [u8],
date: &[u8; 29],
) -> Option<(usize, &'static [u8])> { ... }
fn write_head_split(
self,
out: &mut [u8],
date: &[u8; 29],
) -> Option<(usize, Shared)> { ... }
fn preserialize_static(&self) -> Option<(Vec<u8>, usize, &'static [u8])> { ... }
fn write_head_stream(
self,
out: &mut [u8],
date: &[u8; 29],
) -> Option<(usize, Self::StreamInner)> { ... }
fn body_for_gzip(&self) -> Option<&[u8]> { ... }
fn apply_gzip_body(&mut self, _compressed: Shared) { ... }
fn status(&self) -> StatusCode { ... }
fn body_bytes(&self) -> &[u8] ⓘ { ... }
fn headers_wire(&self) -> Shared { ... }
}Required Associated Types§
type StreamInner: Future<Output = Option<Shared>> + 'static
Provided Methods§
fn write_into_slice(&self, out: &mut [u8], date: &[u8; 29]) -> Option<usize>
fn preserialize(&self) -> (Vec<u8>, usize)
fn write_head_only( &self, out: &mut [u8], date: &[u8; 29], ) -> Option<(usize, &'static [u8])>
fn write_head_split( self, out: &mut [u8], date: &[u8; 29], ) -> Option<(usize, Shared)>
fn preserialize_static(&self) -> Option<(Vec<u8>, usize, &'static [u8])>
fn write_head_stream( self, out: &mut [u8], date: &[u8; 29], ) -> Option<(usize, Self::StreamInner)>
fn body_for_gzip(&self) -> Option<&[u8]>
fn apply_gzip_body(&mut self, _compressed: Shared)
fn status(&self) -> StatusCode
fn body_bytes(&self) -> &[u8] ⓘ
fn headers_wire(&self) -> Shared
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".