Struct ion_c_sys::_ion_writer_options[][src]

#[repr(C)]
pub struct _ion_writer_options {
Show fields pub output_as_binary: BOOL, pub escape_all_non_ascii: BOOL, pub pretty_print: BOOL, pub indent_with_tabs: BOOL, pub indent_size: SIZE, pub small_containers_in_line: BOOL, pub supress_system_values: BOOL, pub flush_every_value: BOOL, pub max_container_depth: SIZE, pub max_annotation_count: SIZE, pub temp_buffer_size: SIZE, pub allocation_page_size: SIZE, pub pcatalog: *mut ION_CATALOG, pub encoding_psymbol_table: ION_COLLECTION, pub decimal_context: *mut decContext, pub compact_floats: BOOL,
}

Fields

output_as_binary: BOOLescape_all_non_ascii: BOOL

On text output, this escapes non-ascii characters. So the output file is pure ascii, only valid for text output

pretty_print: BOOL

Turns on pretty printing, only valid for text output

indent_with_tabs: BOOL

Uses tabs for indenting instead of spaces

indent_size: SIZE

Sets indent amount for pretty printing. Defaults to 2. Ignored if indent_with_tabs is true.

small_containers_in_line: BOOL

Puts “small” containers on a single line instead of putting all values on separate lines

supress_system_values: BOOL

Turns off the otherwise automatic insertion of system values (like symbol tables)

flush_every_value: BOOL

Turns on very active flushing of the internal streams (text only)

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

temp_buffer_size: SIZE

The temp buffer is used to hold temp strings (etc) default is 1024

allocation_page_size: SIZE

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

pcatalog: *mut ION_CATALOG

Handle to catalog of shared symbol tables for the writer to use

encoding_psymbol_table: ION_COLLECTION

An ordered list of ION_SYMBOL_TABLE_IMPORT that the writer will import into each new local symbol table context. Should be initialized by calling ion_writer_options_initialize_shared_imports, populated by calling ion_writer_options_add_shared_imports and/or ion_writer_options_add_shared_imports_symbol_tables, and freed by calling ion_writer_options_close_shared_imports.

NOTE: the system symbol table is always used as the first import; it need not be provided here.

decimal_context: *mut decContext

Handle to the decNumber context for the writer 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 writer 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.

compact_floats: BOOL

Normally floating point numbers (float or double) are written as 32-bit or 64-bit Ion floats depending on which Ion writer API is used. When enabled, this API allows the writer to represent a 64-bit float with only 32 bits whenever possible without losing precision.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.