1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
mod test; extern crate libloading; use std::collections::HashMap; use std::mem::transmute; pub type Result<T> = libloading::Result<T>; pub struct Library<'a> { lib: libloading::Library, fn_map: HashMap<&'a str, libloading::Symbol<'a, *const ()>> } impl<'a> Library<'a> { pub fn new(filename: &str) -> Result<Library<'a>> { panic!("This library is deprecated!, use libfastdl instead") } pub unsafe fn get<T>(&'a mut self, symbol: &'a str) -> Result<&'a libloading::Symbol<'a, T>> { panic!("This library is deprecated!, use libfastdl instead") } }