Trait dlopen::symbor::FromRawResult[][src]

pub trait FromRawResult where
    Self: Sized
{ unsafe fn from_raw_result(
        raw: Result<PtrOrNull<'_, ()>, Error>
    ) -> Result<Self, Error>; }

Allows conversion of raw symbol result into the given symbol.

This trait needs to be implemented by all members of structures that implement the SymBorApi trait. It is used to covert raw result obtained from library into the given object accessible to the user.

Note: Option<T> where T: FromRawResult also implements FromRawResult. This allows you to use options in structures implementing SymBorApi. If the symbol is found, the variable contains Some(symbol), otherwise None.

Note: You probably won’t need to use it directly.

Required methods

unsafe fn from_raw_result(
    raw: Result<PtrOrNull<'_, ()>, Error>
) -> Result<Self, Error>
[src]

Loading content...

Implementations on Foreign Types

impl<'a, T> FromRawResult for Option<T> where
    T: FromRawResult
[src]

Loading content...

Implementors

impl<'lib, T> FromRawResult for PtrOrNull<'lib, T>[src]

impl<'lib, T> FromRawResult for PtrOrNullMut<'lib, T>[src]

impl<'lib, T> FromRawResult for Ref<'lib, T>[src]

impl<'lib, T> FromRawResult for RefMut<'lib, T>[src]

impl<'lib, T> FromRawResult for Symbol<'lib, T>[src]

Loading content...