pub unsafe fn load<S>(name: S) -> Result<Self, Error>
    where
        S: AsRef<OsStr>,
    {
        let lib = Library::open(name)?;
        //this is cheating of course
        //but it is safe because Library and api is placed in the same structure
        //and therefore it is released at the same time.
        let static_ref: &'static Library = transmute(&lib);
        let api = T::load(static_ref)?;
        Ok(Self { api: api, lib: lib })
    }
///Open dynamic link library and load symbols.
Open dynamic link library and load symbols.
Open dynamic link library and load symbols .
pub unsafe fn load<S>(name: S) -> Result<Self, Error>
    where
        S: AsRef<OsStr>,
    {
        let lib = Library::open(name)?;
        //this is cheating of course
        //but it is safe because Library and api is placed in the same structure
        //and therefore it is released at the same time.
        let static_ref: &'static Library = transmute(&lib);
        let api = T::load(static_ref)?;
        Ok(Self { api: api, lib: lib })
    }
pub unsafe fn load < S > ( name : S ) -> Result < Self , Error > where S : AsRef < OsStr > , { let lib = Library :: open ( name ) ? ; //this is cheating of course //but it is safe because Library and api is placed in the same structure //and therefore it is released at the same time. let static_ref : & ' static Library = transmute ( & lib ) ; let api = T :: load ( static_ref ) ? ; Ok ( Self { api : api , lib : lib } ) }
Open dynamic link library and load symbols.
Open dynamic link library and load symbols .
name
S