pub trait RowMapper: Send + Sync {
// Required method
fn map_row(
&self,
from_member_idx: usize,
to_member_idx: usize,
row: u32,
) -> u32;
}Expand description
Pluggable row-mapping function for a pane group (slice D.4.a).
Indices are positions in the host PaneGroup::members vector
(stable across pane re-ordering). Mappers consult their own state to
translate; the identity mapper returns its input.
DX.3 (BC.6 diff extraction): moved DOWN from
lattice-host::pane_group so lattice-diff’s HunkRowMapper can
impl it without the host. The trait references only primitive types
(usize / u32), so it sits cleanly at the bottom of the graph
beside its PaneGroupId / PaneId identity siblings. The host keeps
the PaneGroup registry + the Identity/Offset impls; it
re-exports this trait so existing crate::pane_group::RowMapper call
sites are unchanged.
Required Methods§
Sourcefn map_row(&self, from_member_idx: usize, to_member_idx: usize, row: u32) -> u32
fn map_row(&self, from_member_idx: usize, to_member_idx: usize, row: u32) -> u32
Translate row (a 0-based line) in the group member at
from_member_idx to the corresponding line in the member at
to_member_idx — e.g. the matching line on the other side of a
diff. Must be total: return a best-effort row rather than panic.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".