pub struct JsonOptions {
pub compression: i32,
pub schema_infer_max_rec: Option<u64>,
pub compression_level: Option<u32>,
pub newline_delimited: Option<bool>,
}Expand description
Options controlling CSV format
Fields§
§compression: i32Compression type
schema_infer_max_rec: Option<u64>Optional max records for schema inference
compression_level: Option<u32>Optional compression level
newline_delimited: Option<bool>Whether to read as newline-delimited JSON (default true). When false, expects JSON array format [{},…]
Implementations§
Source§impl JsonOptions
impl JsonOptions
Sourcepub fn compression(&self) -> CompressionTypeVariant
pub fn compression(&self) -> CompressionTypeVariant
Returns the enum value of compression, or the default if the field is set to an invalid enum value.
Sourcepub fn set_compression(&mut self, value: CompressionTypeVariant)
pub fn set_compression(&mut self, value: CompressionTypeVariant)
Sets compression to the provided enum value.
Sourcepub fn schema_infer_max_rec(&self) -> u64
pub fn schema_infer_max_rec(&self) -> u64
Returns the value of schema_infer_max_rec, or the default value if schema_infer_max_rec is unset.
Sourcepub fn compression_level(&self) -> u32
pub fn compression_level(&self) -> u32
Returns the value of compression_level, or the default value if compression_level is unset.
Sourcepub fn newline_delimited(&self) -> bool
pub fn newline_delimited(&self) -> bool
Returns the value of newline_delimited, or the default value if newline_delimited is unset.
Trait Implementations§
Source§impl Clone for JsonOptions
impl Clone for JsonOptions
Source§fn clone(&self) -> JsonOptions
fn clone(&self) -> JsonOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for JsonOptions
Source§impl Debug for JsonOptions
impl Debug for JsonOptions
Source§impl Default for JsonOptions
impl Default for JsonOptions
Source§fn default() -> JsonOptions
fn default() -> JsonOptions
impl Eq for JsonOptions
Source§impl From<&JsonFormatFactory> for JsonOptions
Available on crate feature proto only.Encode a JsonFormatFactory’s options as their protobuf form.
impl From<&JsonFormatFactory> for JsonOptions
proto only.Encode a JsonFormatFactory’s options as their protobuf form.
The reverse direction is From<&protobuf::JsonOptions> for JsonOptions in
datafusion-proto-models: JsonOptions is a datafusion-common type, so
that half cannot live here.
Source§fn from(factory: &JsonFormatFactory) -> JsonOptions
fn from(factory: &JsonFormatFactory) -> JsonOptions
Source§impl Hash for JsonOptions
impl Hash for JsonOptions
Source§impl Message for JsonOptions
impl Message for JsonOptions
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for JsonOptions
impl PartialEq for JsonOptions
impl StructuralPartialEq for JsonOptions
Auto Trait Implementations§
impl Freeze for JsonOptions
impl RefUnwindSafe for JsonOptions
impl Send for JsonOptions
impl Sync for JsonOptions
impl Unpin for JsonOptions
impl UnsafeUnpin for JsonOptions
impl UnwindSafe for JsonOptions
Blanket Implementations§
impl<T> Allocation for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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