Skip to main content

BytesFetch

Trait BytesFetch 

Source
pub trait BytesFetch: Send {
    // Required method
    fn fetch(self: Box<Self>) -> Result<Vec<Bytes>, Box<dyn BytesFetch>>;
}
Expand description

A consume-once handle to bytes previously written via a BytesSpill.

Required Methods§

Source

fn fetch(self: Box<Self>) -> Result<Vec<Bytes>, Box<dyn BytesFetch>>

Consume the handle and return the spilled payload as Bytes.

On failure, the handle is returned so the caller can retry later.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§