pub struct FileChunker { /* private fields */ }Expand description
Chunks a UTF-8 text file. Iterate with FileChunker::next_chunk.
With include_context = true the file is streamed line by line (bounded memory; a single
physical line may not exceed 1 MiB). With include_context = false (flat mode) the file is
read whole and chunked exactly like crate::smart_chunk on the same text; files larger
than FLAT_FILE_MAX_BYTES fail with an InvalidData I/O error. Both modes therefore
give the same chunks for the same text regardless of file size.
Implementations§
Auto Trait Implementations§
impl !Freeze for FileChunker
impl !RefUnwindSafe for FileChunker
impl !Sync for FileChunker
impl !UnwindSafe for FileChunker
impl Forget for FileChunker
impl Move for FileChunker
impl Send for FileChunker
impl Unpin for FileChunker
impl UnsafeUnpin for FileChunker
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more