Skip to main content

Module resolver

Module resolver 

Source
Expand description

Host-owned BufferRegistry-backed impls of the diff subsystem’s resolver seams (DX.6, coupling C6).

The diff subsystem (now lattice-diff) depends only on the abstractions BufferTextProvider / DocumentBufferResolver. Their production impls bridge to crate::buffer_registry::BufferRegistry — a host type — so they CANNOT live in lattice-diff; they stay here. Re-exported under crate::diff::subsystem::* (see diff/mod.rs) so every existing call site reads crate::diff::subsystem::BufferRegistry{TextProvider,DocumentResolver} exactly as before the move.

Structs§

BufferRegistryDocumentResolver
D.3.a.1 (2026-05-29): production DocumentBufferResolver impl. Bridges DocumentId → BufferId via BufferRegistry::buffer_id_for_document. Stored on Editor for the editor’s lifetime and handed to DiffSubsystem::bind so the drainer task can translate bus events.
BufferRegistryTextProvider
D.3.a (2026-05-29): the production BufferTextProvider impl. Bridges the trait to the host’s crate::buffer_registry::BufferRegistry: buffer_rope(id) walks BufferRegistry::document_handle(id) -> RopeDocumentHandle::snapshot() -> snapshot.buffer.to_rope().