Skip to main content

Projection

Trait Projection 

Source
pub trait Projection {
    // Required methods
    fn name(&self) -> &str;
    fn project(
        &self,
        model: &Workbook,
        window: &Window,
        out: &mut dyn FnMut(&str),
    );
}
Expand description

A projection: a pure function from the model and a window to lines, the shape every door prints (SD-23). The grid is the first (crate::view::Grid, KERNEL.4), the sentence pane and the dependency cone drawn as a diagram the core’s (KERNEL.12). An engine’s plane, a byte a cell, is a projection by name beside this trait (crate::machine::plane, KERNEL.22), since its output is a raster and not lines; whether rasters get a trait of their own waits for a second one. A projection never edits the model.

Required Methods§

Source

fn name(&self) -> &str

The projection’s name, as frazaro view selects it.

Source

fn project(&self, model: &Workbook, window: &Window, out: &mut dyn FnMut(&str))

The window’s lines, in a fixed order, to the sink.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§