/// Wrap the `os::platform::Symbol` into this safe wrapper.
///
/// Note that, in order to create association between the symbol and the library this symbol
/// came from, this function requires reference to the library provided.
///
/// ## Unsafety
///
/// It is invalid to provide a reference to any other value other than the library the `sym`
/// was loaded from. Doing so invalidates any lifetime guarantees.
///
/// ## Examples
///
/// ```no_run
/// # use ::libloading::{Library, Symbol};
/// let lib = Library::new("/path/to/awesome.module").unwrap();
/// unsafe {
///     let symbol: Symbol<*mut u32> = lib.get(b"symbol\0").unwrap();
///     let symbol = symbol.into_raw();
///     let symbol = Symbol::from_raw(symbol, &lib);
/// }
/// ```
Wrap the `os::platform::Symbol` into this safe wrapper.
Note that, in order to create association between the symbol and the library this symbol
came from, this function requires reference to the library provided.
Wrap the ` os :: platform :: Symbol ` into this safe wrapper . Note that in order to create association between the symbol and the library this symbol came from this function requires reference to the library provided .
pub unsafe fn from_raw<L>(sym: imp::Symbol<T>, _: &'lib L) -> Symbol<'lib, T> {
        Symbol {
            inner: sym,
            pd: marker::PhantomData
        }
    }
pub unsafe fn from_raw < L > ( sym : imp :: Symbol < T > , _ : & ' lib L ) -> Symbol < ' lib , T > { Symbol { inner : sym , pd : marker :: PhantomData } }
Wrap the `os::platform::Symbol` into this safe wrapper.
Wrap the ` os :: platform :: Symbol ` into this safe wrapper .
sym
&'lib L
unsafety
It is invalid to provide a reference to any other value other than the library the `sym`
was loaded from. Doing so invalidates any lifetime guarantees.
It is invalid to provide a reference to any other value other than the library the ` sym ` was loaded from . Doing so invalidates any lifetime guarantees .
examples
None
use ::libloading::{library, symbol};
let lib = Library::new("/path/to/awesome.module").unwrap();
unsafe {
let symbol: Symbol<*mut u32> = lib.get(b"symbol\0").unwrap();
let symbol = symbol.into_raw();
let symbol = Symbol::from_raw(symbol, &lib);
}
```
let lib = Library :: new ( " / path / to / awesome . module " ) . unwrap () ; unsafe { let symbol : Symbol< * mut u32 > = lib . get ( b " symbol \ 0 " ) . unwrap () ; let symbol = symbol . into_raw () ; let symbol = Symbol :: from_raw ( symbol &lib ) ; } ` ` `