[][src]Struct jimage::Library

pub struct Library(_);

A loaded jimage library such as jimage.dll or libjimage.so

Soundness

The soundness of this type relies on a few assumptions:

  • Any libraries passed to this, are well-formed.
  • Any library exposing all of the expected JIMAGE_* symbols we expect, does so with the right function signatures.
  • The underlying C code we call into is sound. Bugs in jimage.dll, or a bogus implementation, could violate this assumption.

As a failure to meet any of these assumptions would reasonably be considered a bug with that library - not this crate - I consider it reasonable to have the relevant loading methods marked safe. Box::new is marked safe despite similar hypotheticals involving bogus libc.so s with misdefined malloc symbols.

Methods

impl Library[src]

pub const NAME: &'static str[src]

The typical, expected name of the library on this platform - e.g. "jimage.dll" or "libjimage.so"

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

Load a jimage library such as jdk-13.0.1.9-hotspot/bin/jimage.dll

pub fn open(&self, path: impl AsRef<Path>) -> Result<File>[src]

Open a jimage-format file such as jdk-13.0.1.9-hotspot/lib/modules

Auto Trait Implementations

impl RefUnwindSafe for Library

impl Send for Library

impl Sync for Library

impl Unpin for Library

impl UnwindSafe for Library

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, 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.