pub struct ChunkedIterator<R: Read, const MAX_CHUNK_SIZE: usize> { /* private fields */ }Implementations§
Source§impl<R: Read, const MAX_CHUNK_SIZE: usize> ChunkedIterator<R, MAX_CHUNK_SIZE>
Lending Iterator. This doesn’t implement Iterator because that doesn’t allow the Item
to borrow from the iterator (so Item couldn’t be &str).
impl<R: Read, const MAX_CHUNK_SIZE: usize> ChunkedIterator<R, MAX_CHUNK_SIZE>
Lending Iterator. This doesn’t implement Iterator because that doesn’t allow the Item to borrow from the iterator (so Item couldn’t be &str).
max_chunk_size: Estimated size of the biggest chunk we will receive. Ideally a power of 2. It’s OK if this is wrong, we will realloc.
pub fn next_chunk(&mut self) -> Option<OrtResult<&str>>
Auto Trait Implementations§
impl<R, const MAX_CHUNK_SIZE: usize> Freeze for ChunkedIterator<R, MAX_CHUNK_SIZE>where
R: Freeze,
impl<R, const MAX_CHUNK_SIZE: usize> RefUnwindSafe for ChunkedIterator<R, MAX_CHUNK_SIZE>where
R: RefUnwindSafe,
impl<R, const MAX_CHUNK_SIZE: usize> Send for ChunkedIterator<R, MAX_CHUNK_SIZE>where
R: Send,
impl<R, const MAX_CHUNK_SIZE: usize> Sync for ChunkedIterator<R, MAX_CHUNK_SIZE>where
R: Sync,
impl<R, const MAX_CHUNK_SIZE: usize> Unpin for ChunkedIterator<R, MAX_CHUNK_SIZE>where
R: Unpin,
impl<R, const MAX_CHUNK_SIZE: usize> UnsafeUnpin for ChunkedIterator<R, MAX_CHUNK_SIZE>where
R: UnsafeUnpin,
impl<R, const MAX_CHUNK_SIZE: usize> UnwindSafe for ChunkedIterator<R, MAX_CHUNK_SIZE>where
R: UnwindSafe,
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