#[repr(C)]pub struct _cef_v8_interceptor_t {
pub base: cef_base_ref_counted_t,
pub get_byname: Option<unsafe extern "C" fn(self_: *mut _cef_v8_interceptor_t, name: *const cef_string_t, object: *mut _cef_v8_value_t, retval: *mut *mut _cef_v8_value_t, exception: *mut cef_string_t) -> c_int>,
pub get_byindex: Option<unsafe extern "C" fn(self_: *mut _cef_v8_interceptor_t, index: c_int, object: *mut _cef_v8_value_t, retval: *mut *mut _cef_v8_value_t, exception: *mut cef_string_t) -> c_int>,
pub set_byname: Option<unsafe extern "C" fn(self_: *mut _cef_v8_interceptor_t, name: *const cef_string_t, object: *mut _cef_v8_value_t, value: *mut _cef_v8_value_t, exception: *mut cef_string_t) -> c_int>,
pub set_byindex: Option<unsafe extern "C" fn(self_: *mut _cef_v8_interceptor_t, index: c_int, object: *mut _cef_v8_value_t, value: *mut _cef_v8_value_t, exception: *mut cef_string_t) -> c_int>,
}Expand description
Structure that should be implemented to handle V8 interceptor calls. The functions of this structure will be called on the thread associated with the V8 interceptor. Interceptor’s named property handlers (with first argument of type CefString) are called when object is indexed by string. Indexed property handlers (with first argument of type int) are called when object is indexed by integer.
NOTE: This struct is allocated client-side.
Fields§
§base: cef_base_ref_counted_tBase structure.
get_byname: Option<unsafe extern "C" fn(self_: *mut _cef_v8_interceptor_t, name: *const cef_string_t, object: *mut _cef_v8_value_t, retval: *mut *mut _cef_v8_value_t, exception: *mut cef_string_t) -> c_int>Handle retrieval of the interceptor value identified by |name|. |object| is the receiver (‘this’ object) of the interceptor. If retrieval succeeds, set |retval| to the return value. If the requested value does not exist, don’t set either |retval| or |exception|. If retrieval fails, set |exception| to the exception that will be thrown. If the property has an associated accessor, it will be called only if you don’t set |retval|. Return true (1) if interceptor retrieval was handled, false (0) otherwise.
get_byindex: Option<unsafe extern "C" fn(self_: *mut _cef_v8_interceptor_t, index: c_int, object: *mut _cef_v8_value_t, retval: *mut *mut _cef_v8_value_t, exception: *mut cef_string_t) -> c_int>Handle retrieval of the interceptor value identified by |index|. |object| is the receiver (‘this’ object) of the interceptor. If retrieval succeeds, set |retval| to the return value. If the requested value does not exist, don’t set either |retval| or |exception|. If retrieval fails, set |exception| to the exception that will be thrown. Return true (1) if interceptor retrieval was handled, false (0) otherwise.
set_byname: Option<unsafe extern "C" fn(self_: *mut _cef_v8_interceptor_t, name: *const cef_string_t, object: *mut _cef_v8_value_t, value: *mut _cef_v8_value_t, exception: *mut cef_string_t) -> c_int>Handle assignment of the interceptor value identified by |name|. |object| is the receiver (‘this’ object) of the interceptor. |value| is the new value being assigned to the interceptor. If assignment fails, set |exception| to the exception that will be thrown. This setter will always be called, even when the property has an associated accessor. Return true (1) if interceptor assignment was handled, false (0) otherwise.
set_byindex: Option<unsafe extern "C" fn(self_: *mut _cef_v8_interceptor_t, index: c_int, object: *mut _cef_v8_value_t, value: *mut _cef_v8_value_t, exception: *mut cef_string_t) -> c_int>Handle assignment of the interceptor value identified by |index|. |object| is the receiver (‘this’ object) of the interceptor. |value| is the new value being assigned to the interceptor. If assignment fails, set |exception| to the exception that will be thrown. Return true (1) if interceptor assignment was handled, false (0) otherwise.
Trait Implementations§
Source§impl Clone for _cef_v8_interceptor_t
impl Clone for _cef_v8_interceptor_t
Source§fn clone(&self) -> _cef_v8_interceptor_t
fn clone(&self) -> _cef_v8_interceptor_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more