Function mupdf_sys::fz_new_stream[][src]

pub unsafe extern "C" fn fz_new_stream(
    ctx: *mut fz_context,
    state: *mut c_void,
    next: fz_stream_next_fn,
    drop: fz_stream_drop_fn
) -> *mut fz_stream

Create a new stream object with the given internal state and function pointers.

state: Internal state (opaque to everything but implementation).

next: Should provide the next set of bytes (up to max) of stream data. Return the number of bytes read, or EOF when there is no more data.

drop: Should clean up and free the internal state. May not throw exceptions.