pub struct JImage { /* private fields */ }Expand description
Represents a Java Image (JImage) file, which contains resources used by the Java Virtual Machine (JVM).
Implementations§
Source§impl JImage
impl JImage
Sourcepub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
Opens the specified file and memory-maps it to create a JImage instance.
Sourcepub fn find_resource(&self, name: &str) -> Result<Option<Cow<'_, [u8]>>>
pub fn find_resource(&self, name: &str) -> Result<Option<Cow<'_, [u8]>>>
Finds a resource by name and returns its data.
Sourcepub fn resource_names_iter(&self) -> ResourceNamesIter<'_> ⓘ
pub fn resource_names_iter(&self) -> ResourceNamesIter<'_> ⓘ
Returns an iterator over all resource names in the JImage file.
Sourcepub fn resource_names(&self) -> Result<Vec<ResourceName<'_>>>
pub fn resource_names(&self) -> Result<Vec<ResourceName<'_>>>
Returns a vector of all resource names in the JImage file.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JImage
impl RefUnwindSafe for JImage
impl Send for JImage
impl Sync for JImage
impl Unpin for JImage
impl UnwindSafe for JImage
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