Skip to main content

GcodeSink

Trait GcodeSink 

Source
pub trait GcodeSink: Send {
    // Required method
    fn take(&mut self, piece: &[u8]) -> ControlFlow<()>;
}
Expand description

Where PrinterPort::read_gcode streams a file’s G-code to, a piece at a time.

The bytes travel from the printer to the sink and never the other way, so a sink is no way for anything to reach a machine.

Required Methods§

Source

fn take(&mut self, piece: &[u8]) -> ControlFlow<()>

Take the next piece of the file, in order; Break stops the read, and nothing more of the file is asked for.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§