[][src]Struct pelite::resources::version_info::VersionInfo

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

Version Information.

Methods

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

pub fn try_from(bytes: &'a [u8]) -> Result<VersionInfo<'a>>[src]

pub fn fixed(self) -> Option<&'a VS_FIXEDFILEINFO>[src]

Gets the fixed file information if available.

Queries \.

pub fn translation(self) -> &'a [Language][src]

Gets the available languages.

Queries \VarFileInfo\Translation.

pub fn value(self, lang: Language, key: &str) -> Option<String>[src]

Gets a string value by name.

Queries \StringFileInfo\{lang}\{key}

pub fn strings<F: FnMut(&str, &str)>(self, lang: Language, f: F)[src]

Iterates over all the strings' keys and values of a given language.

Queries \StringFileInfo\{lang}\*

pub fn file_info(self) -> FileInfo<'a>[src]

Parse the version info into HashMaps.

pub fn source_code(self) -> String[src]

Renders the version info back into its source code form.

pub fn visit(self, visit: &mut dyn Visit<'a>)[src]

Parse the version information.

Because of the super convoluted format, the visitor pattern is used. Implement the Visit trait to get the desired information.

To keep the API simple all errors are ignored, any invalid or corrupted data is skipped.

Trait Implementations

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

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

impl<'_> Debug for VersionInfo<'_>[src]

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

Auto Trait Implementations

impl<'a> Sync for VersionInfo<'a>

impl<'a> Send for VersionInfo<'a>

impl<'a> Unpin for VersionInfo<'a>

impl<'a> UnwindSafe for VersionInfo<'a>

impl<'a> RefUnwindSafe for VersionInfo<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[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]