pub struct DecoderContext { /* private fields */ }Expand description
Context for decoder creation, containing configuration.
This context is passed through the decoder creation process and contains all the configuration needed to create decoders recursively.
Implementations§
Source§impl DecoderContext
impl DecoderContext
Sourcepub fn coerce_primitive(&self) -> bool
pub fn coerce_primitive(&self) -> bool
Returns whether to coerce primitive types (e.g., number to string)
Sourcepub fn strict_mode(&self) -> bool
pub fn strict_mode(&self) -> bool
Returns whether to validate struct fields strictly
Sourcepub fn struct_mode(&self) -> StructMode
pub fn struct_mode(&self) -> StructMode
Returns how to decode struct fields
Sourcepub fn ignore_type_conflicts(&self) -> bool
pub fn ignore_type_conflicts(&self) -> bool
Returns whether to treat columns with incompatible types as missing (i.e. NULL)
Sourcepub fn decoder_factory(&self) -> Option<&Arc<dyn DecoderFactory>>
pub fn decoder_factory(&self) -> Option<&Arc<dyn DecoderFactory>>
Returns the optional hook for customizing decoding behavior
Sourcepub fn make_decoder(
&self,
field: &FieldRef,
is_nullable: bool,
) -> Result<Box<dyn ArrayDecoder>, ArrowError>
pub fn make_decoder( &self, field: &FieldRef, is_nullable: bool, ) -> Result<Box<dyn ArrayDecoder>, ArrowError>
Create a decoder for a type.
This is the standard way to create child decoders from within a decoder implementation.
Sourcepub fn make_builtin_decoder(
&self,
field: &FieldRef,
is_nullable: bool,
) -> Result<Box<dyn ArrayDecoder>, ArrowError>
pub fn make_builtin_decoder( &self, field: &FieldRef, is_nullable: bool, ) -> Result<Box<dyn ArrayDecoder>, ArrowError>
Create the decoder the reader would use for field, ignoring any
DecoderFactory.
Lets a factory build on the reader’s own decoder, including for the field it was
asked about — which Self::make_decoder cannot do without looping.