Lines Matching defs:new
52 /// the platform specific [`os::unix::Library::new`] and [`os::windows::Library::new`] methods
58 /// [`os::unix::Library::new`]: crate::os::unix::Library::new
59 /// [`os::windows::Library::new`]: crate::os::windows::Library::new
78 /// let _ = Library::new("/path/to/awesome.module").unwrap();
79 /// let _ = Library::new("../awesome.module").unwrap();
80 /// let _ = Library::new("libsomelib.so.1").unwrap();
83 pub unsafe fn new<P: AsRef<OsStr>>(filename: P) -> Result<Library, Error> {
84 imp::Library::new(filename).map(From::from)
119 /// Library::new("/path/to/awesome.module").unwrap()
128 /// # Library::new("/path/to/awesome.module").unwrap()
141 /// # let lib = unsafe { Library::new("/path/to/awesome.module").unwrap() };
216 /// let lib = Library::new("/path/to/awesome.module").unwrap();
239 /// let lib = Library::new("/path/to/awesome.module").unwrap();
262 /// let lib = Library::new("/path/to/awesome.module").unwrap();