[][src]Struct minidl::Library

pub struct Library(_);

A loaded library handle.

Methods

impl Library[src]

pub fn load(path: impl AsRef<Path>) -> Result<Self>[src]

Load a library, forever.

OSBehavior
Windowsminidlrary(path)
Unixdlopen(path, ...)

pub unsafe fn sym<'a, T>(&self, name: impl AsRef<str>) -> Result<T>[src]

Load a symbol from the library. Note that the symbol name must end with '\0'. Limiting yourself to basic ASCII is also likely wise.

Safety

This function implicitly transmutes! Use extreme caution.

Platform

OSBehavior
WindowsGetProcAddress(..., name)
Unixdlsym(..., name)

pub unsafe fn sym_opt<'a, T>(&self, name: impl AsRef<str>) -> Option<T>[src]

Load a symbol from the library. Note that the symbol name must end with '\0'. Limiting yourself to basic ASCII is also likely wise.

Safety

This function implicitly transmutes! Use extreme caution.

Platform

OSBehavior
WindowsGetProcAddress(..., name)
Unixdlsym(..., name)

Trait Implementations

impl Clone for Library[src]

impl Copy for Library[src]

impl Debug for Library[src]

impl Eq for Library[src]

impl Hash for Library[src]

impl Ord for Library[src]

impl PartialEq<Library> for Library[src]

impl PartialOrd<Library> for Library[src]

impl Send for Library[src]

impl StructuralEq for Library[src]

impl StructuralPartialEq for Library[src]

impl Sync for Library[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.