Struct pelite::resources::Resources [−][src]
pub struct Resources<'a> { /* fields omitted */ }
Resources filesystem.
Methods
impl<'a> Resources<'a>
[src]
impl<'a> Resources<'a>
pub fn find_resource<'n>(
&self,
ty: impl Into<Name<'n>>,
name: impl Into<Name<'n>>,
lang: impl Into<Name<'n>>
) -> Result<&'a [u8], FindError>
[src]
pub fn find_resource<'n>(
&self,
ty: impl Into<Name<'n>>,
name: impl Into<Name<'n>>,
lang: impl Into<Name<'n>>
) -> Result<&'a [u8], FindError>
Finds a resource by its type, name and language.
pub fn version_info(&self) -> Result<VersionInfo<'a>, FindError>
[src]
pub fn version_info(&self) -> Result<VersionInfo<'a>, FindError>
Gets the Version Information.
pub fn manifest(&self) -> Result<&'a str, FindError>
[src]
pub fn manifest(&self) -> Result<&'a str, FindError>
Gets the Application Manifest.
pub fn find<P: AsRef<Path> + ?Sized>(
&self,
path: &P
) -> Result<Entry<'a>, FindError>
[src]
pub fn find<P: AsRef<Path> + ?Sized>(
&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]
pub fn find_data<P: AsRef<Path> + ?Sized>(
&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]
pub fn find_dir<P: AsRef<Path> + ?Sized>(
&self,
path: &P
) -> Result<Directory<'a>, FindError>
Finds a directory by its path.
impl<'a> Resources<'a>
[src]
impl<'a> Resources<'a>
pub fn new(section: &'a [u8], dir: &'a IMAGE_DATA_DIRECTORY) -> Resources<'a>
[src]
pub fn new(section: &'a [u8], dir: &'a IMAGE_DATA_DIRECTORY) -> Resources<'a>
Parse the bytes as PE resources.
No validation or integrity checking is done ahead of time.
pub fn root(&self) -> Result<Directory<'a>>
[src]
pub fn root(&self) -> Result<Directory<'a>>
Gets the root directory.
pub fn fsck(&self) -> Result<()>
[src]
pub fn fsck(&self) -> Result<()>
Filesystem consistency check.
Simply walks the filesystem checking all references are valid.
Trait Implementations
impl<'a> Display for Resources<'a>
[src]
impl<'a> Display for Resources<'a>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a> Serialize for Resources<'a>
[src]
impl<'a> Serialize for Resources<'a>
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>
[src]
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>
Serialize this value into the given Serde serializer. Read more
impl<'a> Copy for Resources<'a>
[src]
impl<'a> Copy for Resources<'a>
impl<'a> Clone for Resources<'a>
[src]
impl<'a> Clone for Resources<'a>
fn clone(&self) -> Resources<'a>
[src]
fn clone(&self) -> Resources<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<'a> Debug for Resources<'a>
[src]
impl<'a> Debug for Resources<'a>