Skip to main content

SlotShape

Trait SlotShape 

Source
pub trait SlotShape {
    // Required methods
    fn slot_color(&self) -> SlotColor;
    fn scratch_elem(&self) -> Option<ScratchElem>;
    fn slot_width(&self) -> usize;
}
Expand description

What a port type means to a compiled buffer: its slot color, the width that follows from it, and the scratch element a by-reference producer owns. The type itself is the grammar’s (polydat_grammar::PortType); these are the runtime’s reading of it, and every layout, codegen, and guard decision derives from them.

Required Methods§

Source

fn slot_color(&self) -> SlotColor

Slot color in compiled (P2/P3/hybrid) kernel buffers — axiom S1 (jit_boundary.md §“Slot-state axioms”). The single chokepoint: width and every layout/codegen/guard decision derive from this, never restate it.

Source

fn scratch_elem(&self) -> Option<ScratchElem>

The scratch element a Ref2-colored port’s producer owns (axiom S3); None for an immediate color.

Source

fn slot_width(&self) -> usize

Buffer slots this type occupies — derived from Self::slot_color per axiom S1.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§