Skip to main content
pub struct JsonOptions  /* private fields */ 

How records are sent as JSON.

compression_on changes nothing: JSON requests are not compressed. validate_json has a JSON BulkInserter check each record it is given; insert_records_from_json leaves the checking to the server.

Implementations

Source

pub const VALIDATE_JSON: bool = false

Whether records are checked by default.

Source

pub const COMPRESSION_ON: bool = true

Whether compression is on by default.

Source

pub fn new(validate_json: bool, compression_on: bool) -> Self

Options with validation and compression on or off as given.

Whether records are checked.

Whether compression is on.

Trait Implementations

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source

fn fmt(&self, f: &mut Formatter<’_>) -> Result

Formats the value using the given formatter. Read more
Source

fn default() -> Self

No validation, compression on.

Source

fn fmt(&self, f: &mut Formatter<’_>) -> Result

JsonOptionsvalidate_json=false, compression_on=true.

Source

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source

fn eq(&self, other: &JsonOptions) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.