pub fn open<P: Into<PathBuf>>(path: P) -> Result<Self, Error> {
        let path = path.into();
        let library = Self::load_library(&path)?;

        // Initialize the ingot instance.
        let ptr = unsafe {
            let __ingot_init: Symbol<extern fn() -> *mut Ingot> = match library.get(b"__ingot_init\0") {
                Ok(v) => v,
                Err(_) => return Err(Error::UndefinedSymbol),
            };

            __ingot_init()
        };

        Ok(Self {
            path: path.into(),
            library: library,
            ptr: ptr,
        })
    }
/// Open a dynamic ingot from a shared library file.
Open a dynamic ingot from a shared library file.
Open a dynamic ingot from a shared library file .
pub fn open<P: Into<PathBuf>>(path: P) -> Result<Self, Error> {
        let path = path.into();
        let library = Self::load_library(&path)?;
        // Initialize the ingot instance.
        let ptr = unsafe {
            let __ingot_init: Symbol<extern fn() -> *mut Ingot> = match library.get(b"__ingot_init\0") {
                Ok(v) => v,
                Err(_) => return Err(Error::UndefinedSymbol),
            };
            __ingot_init()
        };
        Ok(Self {
            path: path.into(),
            library: library,
            ptr: ptr,
        })
    }
pub fn open < P : Into < PathBuf > > ( path : P ) -> Result < Self , Error > { let path = path . into ( ) ; let library = Self :: load_library ( & path ) ? ; // Initialize the ingot instance. let ptr = unsafe { let __ingot_init : Symbol < extern fn ( ) -> * mut Ingot > = match library . get ( b" \0 " ) { Ok ( v ) => v , Err ( _ ) => return Err ( Error :: UndefinedSymbol ) , } ; __ingot_init ( ) } ; Ok ( Self { path : path . into ( ) , library : library , ptr : ptr , } ) }
Open a dynamic ingot from a shared library file.
Open a dynamic ingot from a shared library file .
path
P
path
P