Skip to main content

layout_for

Function layout_for 

Source
pub fn layout_for(agent_count: usize) -> Result<SupervisorLayout, PawError>
Expand description

Pure grid-geometry function of agent count, named per the add/remove design (D1). The v0.5.0 layout builder (supervisor_layout) is already a pure function of agent_count; layout_for is the canonical name the add-branch / remove-branch specs use to make explicit that the same geometry is recomputed for N → N+1 (add) and N → N−1 (remove) re-tiling, not just the initial start-time layout.

Returns PawError::ConfigError when agent_count > SUPERVISOR_MAX_AGENTS — the same “split into multiple sessions” error git paw start surfaces.