enum ReaderState<R> {
InvalidState,
Idle {
reader: R,
},
FetchingData {
future: BoxFuture<'static, Result<(R, Bytes), AvroError>>,
next_behaviour: FetchNextBehaviour,
},
DecodingBlock {
data: Bytes,
reader: R,
},
ReadingBatches {
data: Bytes,
block_data: Bytes,
remaining_in_block: usize,
reader: R,
},
Flushing,
Finished,
}Variants§
InvalidState
Intermediate state to fix ownership issues
Idle
Initial state, fetch initial range
Fields
§
reader: RFetchingData
Fetching data from the reader
DecodingBlock
Decode a block in a loop until completion
ReadingBatches
Output batches from a decoded block
Flushing
Successfully finished reading file contents; drain any remaining buffered records from the decoder into (possibly partial) output batches.
Finished
Done, flush decoder and return
Auto Trait Implementations§
impl<R> !Freeze for ReaderState<R>
impl<R> !RefUnwindSafe for ReaderState<R>
impl<R> Send for ReaderState<R>where
R: Send,
impl<R> !Sync for ReaderState<R>
impl<R> Unpin for ReaderState<R>where
R: Unpin,
impl<R> !UnwindSafe for ReaderState<R>
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