Function ion_c_sys::ion_reader_reset_stream[][src]

pub unsafe extern "C" fn ion_reader_reset_stream(
    p_hreader: *mut hREADER,
    handler_state: *mut c_void,
    fn_input_handler: ION_STREAM_HANDLER
) -> iERR
Expand description

Resets input stream for given reader.

readers’ current stream would be closed and would be initialized with given stream. catalog, symbol table, dec_context & other reader defaults would be reused [ @see _ion_reader_initialize impl.]

@param p_hreader Reader object for which input stream is to be reset @param handler_state Object that contains a buffer to store the read-in data from input stream. @param fn_input_handler Function used to read from input stream and refill the buffer. the handler is responsible for settting start, curr and limit of reader object it may opt to change the handler_state if it wants to. on this first call it is actually handling whatever initialization it might need as well @return IERR_OK if succeeded