pub struct DecoderMiddlewareChainCursor<'a> { /* private fields */ }Expand description
A cursor into a decoder middleware chain
Each field scheduler is given a cursor during the create_field_scheduler call. This cursor can be used both to create child field schedulers and to create a scheduler from an inner encoding.
Implementations§
source§impl<'a> DecoderMiddlewareChainCursor<'a>
 
impl<'a> DecoderMiddlewareChainCursor<'a>
sourcepub fn current_path(&self) -> &VecDeque<u32>
 
pub fn current_path(&self) -> &VecDeque<u32>
Returns the current path into the field being decoded
sourcepub fn io(&self) -> &Arc<dyn EncodingsIo>
 
pub fn io(&self) -> &Arc<dyn EncodingsIo>
Returns the I/O service which can be used to grab column metadata
sourcepub fn next(
    self,
    field: &Field,
    column_infos: &mut VecDeque<ColumnInfo>,
    buffers: FileBuffers<'_>,
) -> Result<ChosenFieldScheduler<'a>>
 
pub fn next( self, field: &Field, column_infos: &mut VecDeque<ColumnInfo>, buffers: FileBuffers<'_>, ) -> Result<ChosenFieldScheduler<'a>>
Delegates responsibilty to the next encoder in the chain
Field schedulers should call this method when:
- They do not understand or handle the encoding
 - They wrap an encoding and want a scheduler for the inner encoding
 
sourcepub fn restart_at_current(
    self,
    field: &Field,
    column_infos: &mut VecDeque<ColumnInfo>,
    buffers: FileBuffers<'_>,
) -> Result<ChosenFieldScheduler<'a>>
 
pub fn restart_at_current( self, field: &Field, column_infos: &mut VecDeque<ColumnInfo>, buffers: FileBuffers<'_>, ) -> Result<ChosenFieldScheduler<'a>>
Restarts the decoder chain without creating a new “child”
This can be useful, for example, when a field scheduler has an inner scheduler, and the current / parent strategies might apply to the inner scheduler.
If the current / parent strategies should not be consulted
then call Self::next instead.
sourcepub fn new_child(
    self,
    child_idx: u32,
    field: &Field,
    column_infos: &mut VecDeque<ColumnInfo>,
    buffers: FileBuffers<'_>,
) -> Result<ChosenFieldScheduler<'a>>
 
pub fn new_child( self, child_idx: u32, field: &Field, column_infos: &mut VecDeque<ColumnInfo>, buffers: FileBuffers<'_>, ) -> Result<ChosenFieldScheduler<'a>>
Restarts the decoder chain for a new “child” field.  The main
difference between this and Self::restart_at_current is that
this method will modify Self::current_path
Auto Trait Implementations§
impl<'a> Freeze for DecoderMiddlewareChainCursor<'a>
impl<'a> !RefUnwindSafe for DecoderMiddlewareChainCursor<'a>
impl<'a> Send for DecoderMiddlewareChainCursor<'a>
impl<'a> Sync for DecoderMiddlewareChainCursor<'a>
impl<'a> Unpin for DecoderMiddlewareChainCursor<'a>
impl<'a> !UnwindSafe for DecoderMiddlewareChainCursor<'a>
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
source§impl<T> Instrument for T
 
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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