Skip to main content

Stream

Struct Stream 

Source
pub struct Stream<S>
where S: Future<Output = Option<Shared>> + 'static,
{ /* private fields */ }

Implementations§

Source§

impl<S> Stream<S>
where S: Future<Output = Option<Shared>> + 'static,

Source

pub fn new(stream: S) -> Self

Source

pub fn header(self, name: &[u8], value: &[u8]) -> Self

Source

pub fn write_head_stream( self, out: &mut [u8], date: &[u8; 29], ) -> Option<(usize, S)>

Source§

impl<II> Stream<IterStream<II>>
where II: Iterator<Item = Shared> + Unpin + 'static,

Source

pub fn from_chunks<I>(iter: I) -> Self
where I: IntoIterator<Item = Shared, IntoIter = II>,

Trait Implementations§

Source§

impl<S> IntoServeResponse<'static> for Stream<S>
where S: Future<Output = Option<Shared>> + 'static,

Source§

impl<'req, S> Shape<'req> for Stream<S>
where S: Future<Output = Option<Shared>> + 'static,

Source§

type StreamInner = S

Source§

fn write_head_stream( self, out: &mut [u8], date: &[u8; 29], ) -> Option<(usize, S)>

Source§

fn write_into_slice(&self, out: &mut [u8], date: &[u8; 29]) -> Option<usize>

Source§

fn preserialize(&self) -> (Vec<u8>, usize)

Source§

fn write_head_only( &self, out: &mut [u8], date: &[u8; 29], ) -> Option<(usize, &'static [u8])>

Source§

fn write_head_split( self, out: &mut [u8], date: &[u8; 29], ) -> Option<(usize, Shared)>

Source§

fn preserialize_static(&self) -> Option<(Vec<u8>, usize, &'static [u8])>

Source§

fn body_for_gzip(&self) -> Option<&[u8]>

Source§

fn apply_gzip_body(&mut self, _compressed: Shared)

Source§

fn status(&self) -> StatusCode

Source§

fn body_bytes(&self) -> &[u8]

Source§

fn headers_wire(&self) -> Shared

Auto Trait Implementations§

§

impl<S> !RefUnwindSafe for Stream<S>

§

impl<S> !Send for Stream<S>

§

impl<S> !Sync for Stream<S>

§

impl<S> !UnwindSafe for Stream<S>

§

impl<S> Freeze for Stream<S>
where S: Freeze,

§

impl<S> Unpin for Stream<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for Stream<S>
where S: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.