Skip to main content

ProcVoidMethodExt

Trait ProcVoidMethodExt 

Source
pub trait ProcVoidMethodExt: Sized {
    // Required methods
    fn from_fn<T: IProcInst>(
        target: T,
        callback: extern "C" fn(T, OptionalMethod),
    ) -> Option<Self>;
    fn from_raw_parts(
        target: IlInstance,
        method_info: &'static MethodInfo,
    ) -> Option<Self>;
}

Required Methods§

Source

fn from_fn<T: IProcInst>( target: T, callback: extern "C" fn(T, OptionalMethod), ) -> Option<Self>

Bind target and call callback on it. ProcVoidMethod’s Invoke() takes no VM argument, so the bound target is the only object the callback ever sees, that’s why it’s required. The callback’s first parameter is forced to the same type as target, so they can’t drift.

Source

fn from_raw_parts( target: IlInstance, method_info: &'static MethodInfo, ) -> Option<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§