Struct dlopen::raw::AddressInfoObtainer [−][src]
Obtains information about an address previously loaded from a dynamic load library.
Implementations
impl AddressInfoObtainer
[src]
pub fn new() -> AddressInfoObtainer
[src]
pub fn obtain(&self, addr: *const ()) -> Result<AddressInfo, Error>
[src]
Obtains information about an address previously loaded from a dynamic load library.
Example
extern crate dlopen; use dlopen::raw::{Library, AddressInfoObtainer}; fn main() { let lib = Library::open("libyourlib.so").unwrap(); let ptr: * const i32 = unsafe{ lib.symbol("symbolname") }.unwrap(); // now we can obtain information about the symbol - library, base address etc. let aio = AddressInfoObtainer::new(); let addr_info = aio.obtain(ptr as * const ()).unwrap(); println!("Library path: {}", &addr_info.dll_path); println!("Library base address: {:?}", addr_info.dll_base_addr); if let Some(os) = addr_info.overlapping_symbol{ println!("Overlapping symbol name: {}", &os.name); println!("Overlapping symbol address: {:?}", os.addr); } }
Trait Implementations
impl Drop for AddressInfoObtainer
[src]
Auto Trait Implementations
impl RefUnwindSafe for AddressInfoObtainer
impl Send for AddressInfoObtainer
impl Sync for AddressInfoObtainer
impl Unpin for AddressInfoObtainer
impl UnwindSafe for AddressInfoObtainer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,