Skip to main content

Receiver

Trait Receiver 

Source
pub trait Receiver {
    // Required method
    fn write(&mut self, bytes: &[u8]) -> Result<(), Refused>;
}
Expand description

A source-facing chunk receiver.

Required Methods§

Source

fn write(&mut self, bytes: &[u8]) -> Result<(), Refused>

Delivers the next complete chunk in logical order.

On refusal the source must stop. The driver additionally enforces sticky refusal if a source ignores this marker, without cloning the cause.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§