Skip to main content

CCallbackBaseVmt

Trait CCallbackBaseVmt 

Source
pub trait CCallbackBaseVmt<P: 'static>: 'static {
    // Required methods
    extern "C" fn run(&mut self, pv_param: *mut P);
    extern "C" fn run_call(
        &mut self,
        pv_param: *mut P,
        io_failure: bool,
        api_call: u64,
    );
    extern "C" fn get_callback_size_bytes(&mut self) -> i32;
    extern "C" fn destructor(&mut self, should_free: bool);
}

Required Methods§

Source

extern "C" fn run(&mut self, pv_param: *mut P)

Called when the callback is triggered

Source

extern "C" fn run_call( &mut self, pv_param: *mut P, io_failure: bool, api_call: u64, )

Called when the callback is triggered as a result of a specific API call

Source

extern "C" fn get_callback_size_bytes(&mut self) -> i32

Returns the size of the parameter struct (P)

Source

extern "C" fn destructor(&mut self, should_free: bool)

Trait Implementations§

Source§

impl<P: 'static, __VtableT: CCallbackBaseVmt<P>> VmtInstance<__VtableT> for dyn CCallbackBaseVmt<P>

Source§

const VTABLE: &'static Self::Layout<__VtableT>

Source§

impl<P: 'static> VmtLayout for dyn CCallbackBaseVmt<P>

Source§

type Layout<__VtableT: 'static> = CCallbackBaseVmtLayout<__VtableT, P>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§