[][src]Struct pelite::resources::Resources

pub struct Resources<'a> { /* fields omitted */ }

Resources filesystem.

Methods

impl<'a> Resources<'a>[src]

pub fn find_resource(&self, ty: Name, name: Name) -> Result<&'a [u8], FindError>[src]

Finds a resource by its type and name.

pub fn find_resources(
    &self,
    ty: Name,
    name: Name
) -> Result<Directory<'a>, FindError>
[src]

Finds the language directory for a resource with given type and name.

pub fn find_resource_ex(
    &self,
    ty: Name,
    name: Name,
    lang: Name
) -> Result<&'a [u8], FindError>
[src]

Finds the resource with specified type, name and language.

pub fn version_info(&self) -> Result<VersionInfo<'a>, FindError>[src]

Gets the Version Information.

pub fn manifest(&self) -> Result<&'a str, FindError>[src]

Gets the Application Manifest.

pub fn group_icons(
    &self
) -> impl 'a + Iterator<Item = Result<(Name<'a>, GroupIcon<'a>), FindError>> + Clone
[src]

Gets the group icons.

pub fn group_cursors(
    &self
) -> impl 'a + Iterator<Item = Result<(Name<'a>, GroupCursor<'a>), FindError>> + Clone
[src]

Gets the group cursors.

impl<'a> Resources<'a>[src]

pub fn find<P: AsRef<Path> + ?Sized>(
    &self,
    path: &P
) -> Result<Entry<'a>, FindError>
[src]

Finds a file or directory by its path.

pub fn find_data<P: AsRef<Path> + ?Sized>(
    &self,
    path: &P
) -> Result<DataEntry<'a>, FindError>
[src]

Finds a file by its path.

pub fn find_dir<P: AsRef<Path> + ?Sized>(
    &self,
    path: &P
) -> Result<Directory<'a>, FindError>
[src]

Finds a directory by its path.

impl<'a> Resources<'a>[src]

pub fn new(section: &'a [u8], dir: &'a IMAGE_DATA_DIRECTORY) -> Resources<'a>[src]

Parse the bytes as PE resources.

No validation or integrity checking is done ahead of time.

pub fn root(&self) -> Result<Directory<'a>>[src]

Gets the root directory.

pub fn fsck(&self) -> Result<()>[src]

Filesystem consistency check.

Simply walks the filesystem checking all references are valid.

Trait Implementations

impl<'a> Clone for Resources<'a>[src]

impl<'a> Copy for Resources<'a>[src]

impl<'a> Debug for Resources<'a>[src]

impl<'a> Display for Resources<'a>[src]

impl<'a> Serialize for Resources<'a>[src]

Auto Trait Implementations

impl<'a> Sync for Resources<'a>

impl<'a> Send for Resources<'a>

impl<'a> Unpin for Resources<'a>

impl<'a> UnwindSafe for Resources<'a>

impl<'a> RefUnwindSafe for Resources<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for 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.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]