pub trait InputIsStreaming<const YES: bool>: Sized {
    type Complete: InputIsStreaming<false>;
    type Streaming: InputIsStreaming<true>;

    // Required methods
    fn into_complete(self) -> Self::Complete;
    fn into_streaming(self) -> Self::Streaming;
}
Expand description

Marks the input as being the complete buffer or a partial buffer for streaming input

See Streaming for marking a presumed complete buffer type as a streaming buffer.

Required Associated Types§

source

type Complete: InputIsStreaming<false>

Complete counterpart

  • Set to Self if this is a complete buffer.
  • Set to std::convert::Infallible if there isn’t an associated complete buffer type
source

type Streaming: InputIsStreaming<true>

Streaming counterpart

  • Set to Self if this is a streaming buffer.
  • Set to std::convert::Infallible if there isn’t an associated streaming buffer type

Required Methods§

source

fn into_complete(self) -> Self::Complete

Convert to complete counterpart

source

fn into_streaming(self) -> Self::Streaming

Convert to streaming counterpart

Implementations on Foreign Types§

source§

impl<T, const L: usize> InputIsStreaming<false> for [T; L]

source§

impl<'a, T> InputIsStreaming<false> for &'a [T]

§

type Complete = &'a [T]

§

type Streaming = Streaming<&'a [T]>

source§

fn into_complete(self) -> Self::Complete

source§

fn into_streaming(self) -> Self::Streaming

source§

impl<'a, T, const L: usize> InputIsStreaming<false> for &'a [T; L]

source§

impl<const YES: bool> InputIsStreaming<YES> for Infallible

source§

impl<'a> InputIsStreaming<false> for (&'a [u8], usize)

§

type Complete = (&'a [u8], usize)

§

type Streaming = Streaming<(&'a [u8], usize)>

source§

fn into_complete(self) -> Self::Complete

source§

fn into_streaming(self) -> Self::Streaming

source§

impl<'a> InputIsStreaming<false> for &'a str

§

type Complete = &'a str

§

type Streaming = Streaming<&'a str>

source§

fn into_complete(self) -> Self::Complete

source§

fn into_streaming(self) -> Self::Streaming

Implementors§

source§

impl<I> InputIsStreaming<false> for Located<I>where I: InputIsStreaming<false>,

source§

impl<I> InputIsStreaming<true> for Located<I>where I: InputIsStreaming<true>,

source§

impl<I> InputIsStreaming<true> for Streaming<I>where I: InputIsStreaming<false>,

§

type Complete = I

§

type Streaming = Streaming<I>

source§

impl<I, S> InputIsStreaming<false> for Stateful<I, S>where I: InputIsStreaming<false>,

§

type Complete = Stateful<I, S>

§

type Streaming = Stateful<<I as InputIsStreaming<false>>::Streaming, S>

source§

impl<I, S> InputIsStreaming<true> for Stateful<I, S>where I: InputIsStreaming<true>,

§

type Complete = Stateful<<I as InputIsStreaming<true>>::Complete, S>

§

type Streaming = Stateful<I, S>