cef_read_handler_t

Type Alias cef_read_handler_t 

Source
pub type cef_read_handler_t = _cef_read_handler_t;
Expand description

Structure the client can implement to provide a custom stream reader. The functions of this structure may be called on any thread.

NOTE: This struct is allocated client-side.

Aliased Type§

#[repr(C)]
pub struct cef_read_handler_t { pub base: _cef_base_ref_counted_t, pub read: Option<unsafe extern "C" fn(*mut _cef_read_handler_t, *mut c_void, usize, usize) -> usize>, pub seek: Option<unsafe extern "C" fn(*mut _cef_read_handler_t, i64, i32) -> i32>, pub tell: Option<unsafe extern "C" fn(*mut _cef_read_handler_t) -> i64>, pub eof: Option<unsafe extern "C" fn(*mut _cef_read_handler_t) -> i32>, pub may_block: Option<unsafe extern "C" fn(*mut _cef_read_handler_t) -> i32>, }

Fields§

§base: _cef_base_ref_counted_t

Base structure.

§read: Option<unsafe extern "C" fn(*mut _cef_read_handler_t, *mut c_void, usize, usize) -> usize>

Read raw binary data.

§seek: Option<unsafe extern "C" fn(*mut _cef_read_handler_t, i64, i32) -> i32>

Seek to the specified offset position. |whence| may be any one of SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.

§tell: Option<unsafe extern "C" fn(*mut _cef_read_handler_t) -> i64>

Return the current offset position.

§eof: Option<unsafe extern "C" fn(*mut _cef_read_handler_t) -> i32>

Return non-zero if at end of file.

§may_block: Option<unsafe extern "C" fn(*mut _cef_read_handler_t) -> i32>

Return true (1) if this handler performs work like accessing the file system which may block. Used as a hint for determining the thread to access the handler from.