#[repr(C)]
pub struct _ion_reader_options {
Show 13 fields pub return_system_values: BOOL, pub new_line_char: c_int, pub max_container_depth: SIZE, pub max_annotation_count: SIZE, pub max_annotation_buffered: SIZE, pub symbol_threshold: SIZE, pub user_value_threshold: SIZE, pub chunk_threshold: SIZE, pub allocation_page_size: SIZE, pub skip_character_validation: BOOL, pub pcatalog: *mut ION_CATALOG, pub decimal_context: *mut decContext, pub context_change_notifier: ION_READER_CONTEXT_CHANGE_NOTIFIER,
}
Expand description

Reader configuration data, could be supplied by user during reader creation time. All fields in the structure are defaulted to 0, except for the following:

#define DEFAULT_ANNOTATION_LIMIT 10 #define DEFAULT_WRITER_STACK_DEPTH 10 #define DEFAULT_CHUNK_THRESHOLD DEFAULT_BLOCK_SIZE #define DEFAULT_SYMBOL_THRESHOLD 512

Some field also has a range limit: #define MIN_ANNOTATION_LIMIT 1 #define MIN_WRITER_STACK_DEPTH 2 #define MIN_SYMBOL_THRESHOLD 32 #define MIN_CHUNK_THRESHOLD 32 #define MIN_ION_ALLOCATION_BLOCK_SIZE 32

Fields§

§return_system_values: BOOL

If true the reader will return otherwise hidden system values

§new_line_char: c_int

Character to be treated as new line for line counting, defaults to ‘\n’

§max_container_depth: SIZE

The max container depth defaults to 10

§max_annotation_count: SIZE

The max number of annotations on 1 value, defaults to 10

§max_annotation_buffered: SIZE

The max number number of bytes the annotations on a single value. This is an total. How the bytes are divided among the annotations is irrelevant (i.e. 1 large, or 100 small may have the same total space requirements). defaults to user_value_threshold (or 4096).

§symbol_threshold: SIZE

The size maximum size allowed for symbols, 512 bytes is the default

§user_value_threshold: SIZE

user value allocation threshold, max size of allocation made to process any value returned to the user, default is 4096. Includes symbol, int, decimal, timestamp, blob values in all cases. This includes string, clob, and blob values if they are to be returned to the caller in a contiguous buffer.

§chunk_threshold: SIZE

The size over which long values are returned as chunks. This is only valid for string, clob and blob values as all others must be buffered up to the limit of user_value_threshold. The default is 4096.

§allocation_page_size: SIZE

Memory is allocated in pages owned by the primary entities it’s default size is 4096

§skip_character_validation: BOOL

If true this will disable validation of string content which verifies the string returned is in fact a valid UTF-8 sequence. This defaults to false.

§pcatalog: *mut ION_CATALOG

Handle to catalog of shared symbol tables for the reader to use. If NULL, will be treated as empty.

§decimal_context: *mut decContext

Handle to the decNumber context for the reader to use. This allows configuration of the maximum number of decimal digits, decimal exponent range, etc. See decContextDefault in decContext.h for simple initialization.

If NULL, the reader will initialize its decimal context by calling decContextDefault with the DEC_INIT_DECQUAD option, which results in a maximum of 34 decimal digits and an exponent range of [-6143, 6144].

Note that up to 34 digits of precision will always be supported, even if configured to be less than 34.

§context_change_notifier: ION_READER_CONTEXT_CHANGE_NOTIFIER

Notification callback data to be used upon symbol table context change. Ignored if context_change_notifier.notify is NULL.

Trait Implementations§

source§

impl Clone for _ion_reader_options

source§

fn clone(&self) -> _ion_reader_options

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for _ion_reader_options

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for _ion_reader_options

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Copy for _ion_reader_options

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.