#[repr(C)]pub struct ResourceTypeInit {
pub dtor: Option<unsafe extern "C" fn(*mut Env, *mut c_void)>,
pub stop: Option<unsafe extern "C" fn(*mut Env, *mut c_void, Event, c_int)>,
pub down: Option<unsafe extern "C" fn(*mut Env, *mut c_void, *mut Pid, *mut Monitor)>,
pub members: c_int,
pub dyncall: Option<unsafe extern "C" fn(*mut Env, *mut c_void, *mut c_void)>,
}Expand description
Callback table for resource type registration.
members must equal the number of callback fields provided, counting from
the start: 1 = dtor, 2 = +stop, 3 = +down, 4 = +dyncall; dyncall was added
in NIF 2.16 (OTP 24). The field is always present — set members to bound
what the target BEAM understands.
ErlNifResourceTypeInit — NIF 2.12 — OTP 20
Fields§
§dtor: Option<unsafe extern "C" fn(*mut Env, *mut c_void)>§stop: Option<unsafe extern "C" fn(*mut Env, *mut c_void, Event, c_int)>§down: Option<unsafe extern "C" fn(*mut Env, *mut c_void, *mut Pid, *mut Monitor)>§members: c_int§dyncall: Option<unsafe extern "C" fn(*mut Env, *mut c_void, *mut c_void)>Auto Trait Implementations§
impl Freeze for ResourceTypeInit
impl RefUnwindSafe for ResourceTypeInit
impl Send for ResourceTypeInit
impl Sync for ResourceTypeInit
impl Unpin for ResourceTypeInit
impl UnsafeUnpin for ResourceTypeInit
impl UnwindSafe for ResourceTypeInit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more