[][src]Struct ion_c_sys::_ion_reader_options

#[repr(C)]pub struct _ion_reader_options {
    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,
}

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

impl Clone for _ion_reader_options[src]

impl Copy for _ion_reader_options[src]

impl Debug for _ion_reader_options[src]

impl Default for _ion_reader_options[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.