Skip to main content

ZeroCopyStream

Trait ZeroCopyStream 

Source
pub trait ZeroCopyStream<'a> {
    type Item;

    // Required method
    fn stream_parse(&self) -> impl Iterator<Item = Self::Item> + 'a;
}
Expand description

A zero-allocation stream processor trait that iterates over lines or chunks of bytes/strings without allocating to the heap.

Required Associated Types§

Required Methods§

Source

fn stream_parse(&self) -> impl Iterator<Item = Self::Item> + 'a

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.

Implementors§