Trait dlopen::symbor::FromRawResult [−][src]
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
Loading content...Implementations on Foreign Types
impl<'a, T> FromRawResult for Option<T> where
T: FromRawResult,
[src]
T: FromRawResult,
unsafe fn from_raw_result(
raw_result: Result<PtrOrNull<'_, ()>, Error>
) -> Result<Option<T>, Error>
[src]
raw_result: Result<PtrOrNull<'_, ()>, Error>
) -> Result<Option<T>, Error>
Implementors
impl<'lib, T> FromRawResult for PtrOrNull<'lib, T>
[src]
unsafe fn from_raw_result(
raw_result: Result<PtrOrNull<'_, ()>, Error>
) -> Result<Self, Error>
[src]
raw_result: Result<PtrOrNull<'_, ()>, Error>
) -> Result<Self, Error>
impl<'lib, T> FromRawResult for PtrOrNullMut<'lib, T>
[src]
unsafe fn from_raw_result(
raw_result: Result<PtrOrNull<'_, ()>, Error>
) -> Result<Self, Error>
[src]
raw_result: Result<PtrOrNull<'_, ()>, Error>
) -> Result<Self, Error>
impl<'lib, T> FromRawResult for Ref<'lib, T>
[src]
unsafe fn from_raw_result(
raw_result: Result<PtrOrNull<'_, ()>, Error>
) -> Result<Self, Error>
[src]
raw_result: Result<PtrOrNull<'_, ()>, Error>
) -> Result<Self, Error>
impl<'lib, T> FromRawResult for RefMut<'lib, T>
[src]
unsafe fn from_raw_result(
raw_result: Result<PtrOrNull<'_, ()>, Error>
) -> Result<Self, Error>
[src]
raw_result: Result<PtrOrNull<'_, ()>, Error>
) -> Result<Self, Error>