[−][src]Struct pelite::resources::Resources
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]
&self,
ty: Name,
name: Name
) -> Result<Directory<'a>, FindError>
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]
&self,
ty: Name,
name: Name,
lang: Name
) -> Result<&'a [u8], FindError>
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]
&self
) -> impl 'a + Iterator<Item = Result<(Name<'a>, GroupIcon<'a>), FindError>> + Clone
Gets the group icons.
pub fn group_cursors(
&self
) -> impl 'a + Iterator<Item = Result<(Name<'a>, GroupCursor<'a>), FindError>> + Clone
[src]
&self
) -> impl 'a + Iterator<Item = Result<(Name<'a>, GroupCursor<'a>), FindError>> + Clone
Gets the group cursors.
impl<'a> Resources<'a>
[src]
pub fn find<P: AsRef<Path> + ?Sized>(
&self,
path: &P
) -> Result<Entry<'a>, FindError>
[src]
&self,
path: &P
) -> Result<Entry<'a>, FindError>
Finds a file or directory by its path.
pub fn find_data<P: AsRef<Path> + ?Sized>(
&self,
path: &P
) -> Result<DataEntry<'a>, FindError>
[src]
&self,
path: &P
) -> Result<DataEntry<'a>, FindError>
Finds a file by its path.
pub fn find_dir<P: AsRef<Path> + ?Sized>(
&self,
path: &P
) -> Result<Directory<'a>, FindError>
[src]
&self,
path: &P
) -> Result<Directory<'a>, FindError>
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]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,