pub struct SegBuffer { /* private fields */ }Expand description
A segmented buffer that holds data in multiple segments.
The Buffer struct represents a buffer that is divided into multiple segments.
It contains the LineIndex and the internal representation of the segments.
Implementations§
source§impl SegBuffer
impl SegBuffer
pub fn read_file( file: File, seg_count: NonZeroUsize, complete: bool ) -> Result<Self>
pub fn read_stream(stream: BoxedStream, complete: bool) -> Result<Self>
sourcepub fn line_count(&self) -> usize
pub fn line_count(&self) -> usize
Return the line count of this SegBuffer.
pub fn get_bytes(&self, line_number: usize) -> Option<SegBytes>
pub fn segment_iter(&self) -> Result<ContiguousSegmentIterator>
pub fn all_line_matches(&self) -> LineSet
pub fn write_file(&mut self, output: File, lines: LineSet) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for SegBuffer
impl Send for SegBuffer
impl !Sync for SegBuffer
impl Unpin for SegBuffer
impl UnwindSafe for SegBuffer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more