pub struct DecoderContext {
coerce_primitive: bool,
strict_mode: bool,
struct_mode: StructMode,
}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.
Fields§
§coerce_primitive: boolWhether to coerce primitives to strings
strict_mode: boolWhether to validate struct fields strictly
struct_mode: StructModeHow to decode struct fields
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
Sourcefn make_decoder(
&self,
data_type: &DataType,
is_nullable: bool,
) -> Result<Box<dyn ArrayDecoder>, ArrowError>
fn make_decoder( &self, data_type: &DataType, 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.
Auto Trait Implementations§
impl Freeze for DecoderContext
impl RefUnwindSafe for DecoderContext
impl Send for DecoderContext
impl Sync for DecoderContext
impl Unpin for DecoderContext
impl UnwindSafe for DecoderContext
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