Function wintun::load_from_library[][src]

pub unsafe fn load_from_library<L>(library: L) -> Result<Wintun, Error> where
    L: Into<Library>, 
Expand description

Attempts to load the Wintun library from an existing libloading::Library.

Safety

This function loads the required WinTun functions using the provided library. Reading a symbol table of a dynamic library and transmuting the function pointers inside to have the parameters and return values expected by the functions documented at: https://git.zx2c4.com/wintun/about/#reference is inherently unsafe.

For more information see libloading’s dynamic library safety guarantees: libloading::Library::new