CBaseAPILoader

Trait CBaseAPILoader 

Source
pub trait CBaseAPILoader<'interface> {
    type Interface: CBaseAccess<'interface>;

    // Required method
    unsafe fn fetch_interface(
        base_module: Option<NonNull<CBaseFFI>>,
        get_function_fn: GetFunctionFnFFI,
    ) -> Self::Interface;
}
Expand description

Trait for loading the interface.

Required Associated Types§

Source

type Interface: CBaseAccess<'interface>

Type of the interface.

Required Methods§

Source

unsafe fn fetch_interface( base_module: Option<NonNull<CBaseFFI>>, get_function_fn: GetFunctionFnFFI, ) -> Self::Interface

Fetches the emf-core-base interface.

§Safety

The parameter get_function_fn must be able to accept base_module.

§Panics

This function panics if it can not fetch the interface.

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§

Source§

impl<'interface> CBaseAPILoader<'interface> for CBase<'interface>

Source§

type Interface = CBase<'interface>