Skip to main content

Module buffer

Module buffer 

Source

Re-exports§

pub use encoding::Encoding;
pub use crate::primitives::line_iterator::LineIterator;

Structs§

BufferConfig
Configuration passed to TextBuffer constructors.
BufferSnapshot
Snapshot of a TextBuffer’s piece tree and associated string buffers.
ChunkInfo
Information about a chunk of data for pattern matching
LargeFileEncodingConfirmation
Error returned when a large file has a non-resynchronizable encoding and requires user confirmation before loading the entire file into memory.
LineData
Line data with optional line number
LineScanChunk
A work item for incremental line-feed scanning (one per leaf).
OverlappingChunks
Iterator that yields overlapping chunks for pattern matching
SudoSaveRequired
Error returned when a file save operation requires elevated privileges.
TextBuffer
A text buffer that manages document content using a piece table with integrated line tracking
TextBufferLineIterator
Iterator over lines in a TextBuffer that efficiently tracks line numbers using piece tree metadata (single source of truth)

Enums§

LineEnding
Line ending format used in the file
LineNumber
Represents a line number (simplified for new implementation) Legacy enum kept for backwards compatibility - always Absolute now

Constants§

CHUNK_ALIGNMENT
Chunk alignment for lazy loading (64 KB)
DEFAULT_LARGE_FILE_THRESHOLD
Default threshold for considering a file “large” (100 MB)
LOAD_CHUNK_SIZE
Chunk size to load when lazy loading (1 MB)

Type Aliases§

Buffer
Type alias for backwards compatibility