Skip to main content

project_buffer_snapshot

Function project_buffer_snapshot 

Source
pub fn project_buffer_snapshot(
    snap: &ActiveBufferSnapshot<'_>,
) -> Result<BufferSnapshot, String>
Expand description

Project the borrow-carrying ActiveBufferSnapshot into the owned WIT [buffer::BufferSnapshot] metadata record (§4.2). Bulk text is NOT copied here — it rides the document handle. A non-UTF-8 path is a typed error (never lossy), matching the boundary convention.