[][src]Struct pelite::resources::Directory

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

Directory.

Methods

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

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

Looks up the entry by name.

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

Looks up the data entry by name.

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

Looks up the directory by name.

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

Gets the first entry.

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

Gets the first data entry.

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

Gets the first directory.

impl<'a> Directory<'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> Directory<'a>[src]

pub fn resources(&self) -> Resources<'a>[src]

Gets the resources.

pub fn image(&self) -> &'a IMAGE_RESOURCE_DIRECTORY[src]

Gets the underlying resource directory image.

pub fn entries(
    &self
) -> Entries<'a, impl Clone + FnMut(&'a IMAGE_RESOURCE_DIRECTORY_ENTRY) -> DirectoryEntry<'a>>
[src]

Gets the directory entries.

pub fn named_entries(
    &self
) -> Entries<'a, impl Clone + FnMut(&'a IMAGE_RESOURCE_DIRECTORY_ENTRY) -> DirectoryEntry<'a>>
[src]

Gets the named entries in this directory.

Note that while it would be a violation of the format spec, there's no strict safety guarantee that these are only named entries.

pub fn id_entries(
    &self
) -> Entries<'a, impl Clone + FnMut(&'a IMAGE_RESOURCE_DIRECTORY_ENTRY) -> DirectoryEntry<'a>>
[src]

Gets the id entries in this directory.

Note that while it would be a violation of the format spec, there's no strict safety guarantee that these are only id entries.

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

Filesystem consistency check.

Simply walks the filesystem checking all references are valid.

Trait Implementations

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

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

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

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

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

Auto Trait Implementations

impl<'a> Sync for Directory<'a>

impl<'a> Send for Directory<'a>

impl<'a> Unpin for Directory<'a>

impl<'a> UnwindSafe for Directory<'a>

impl<'a> RefUnwindSafe for Directory<'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]