nom8::input

Trait InputIsStreaming

Source
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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

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>,

Source§

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

Source§

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