Function ion_c_sys::ion_writer_add_imported_tables[][src]

pub unsafe extern "C" fn ion_writer_add_imported_tables(
    hwriter: hWRITER,
    imports: *mut ION_COLLECTION
) -> iERR
Expand description

Adds the given list of imports to the writer’s list of imports. These imports will only be used in the writer’s current symbol table context. To configure the writer to use the same list of imports for each new symbol table context, convey that list of imports through ION_WRITER_OPTIONS.

If the writer’s current symbol table context must be serialized, forces the writer to finish and flush its current symbol table context (with the same side-effects as ion_writer_finish) first. A new symbol table context is then created, starting with any imports specified in ION_WRITER_OPTIONS, and followed by the list of imports given to this function.

This function may be called multiple times in succession without changing the current symbol table context as long as no values have been written in between calls; in this case, this function appends to the writer’s list of imports.

Raises an error if a manually-written symbol table is in progress, if the writer is not at the top level, or if the writer has pending annotations.