pub struct LibrarySymbol(/* private fields */);Available on macOS only.
Expand description
An opaque, non-null pointer to a symbol resolved from a loaded library.
This is a repr(transparent) wrapper around NonNull<c_void>, which makes it safe to
transmute into a function pointer of the correct signature. The null case is already
handled by LibraryHandle::symbol, which returns Err instead.
§Safety
A LibrarySymbol borrows the memory-mapped pages of its originating library. It must
not be used (directly or after transmuting to a function pointer) once the
LibraryHandle that produced it has been closed or dropped.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LibrarySymbol
impl RefUnwindSafe for LibrarySymbol
impl !Send for LibrarySymbol
impl !Sync for LibrarySymbol
impl Unpin for LibrarySymbol
impl UnsafeUnpin for LibrarySymbol
impl UnwindSafe for LibrarySymbol
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more