Struct pelite::resources::version_info::VersionInfo
source · [−]pub struct VersionInfo<'a> { /* private fields */ }
Expand description
Version Information.
Implementations
sourceimpl<'a> VersionInfo<'a>
impl<'a> VersionInfo<'a>
pub fn try_from(bytes: &'a [u8]) -> Result<VersionInfo<'a>>
sourcepub fn fixed(self) -> Option<&'a VS_FIXEDFILEINFO>
pub fn fixed(self) -> Option<&'a VS_FIXEDFILEINFO>
Gets the fixed file information if available.
Queries \
.
sourcepub fn translation(self) -> &'a [Language]
pub fn translation(self) -> &'a [Language]
Gets the available languages.
Queries \VarFileInfo\Translation
.
sourcepub fn value(self, lang: Language, key: &str) -> Option<String>
pub fn value(self, lang: Language, key: &str) -> Option<String>
Gets a string value by name.
Queries \StringFileInfo\{lang}\{key}
sourcepub fn strings<F: FnMut(&str, &str)>(self, lang: Language, f: F)
pub fn strings<F: FnMut(&str, &str)>(self, lang: Language, f: F)
Iterates over all the strings’ keys and values of a given language.
Queries \StringFileInfo\{lang}\*
sourcepub fn source_code(self) -> String
pub fn source_code(self) -> String
Renders the version info back into its source code form.
sourcepub fn visit(self, visit: &mut dyn Visit<'a>)
pub fn visit(self, visit: &mut dyn Visit<'a>)
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
sourceimpl<'a> Clone for VersionInfo<'a>
impl<'a> Clone for VersionInfo<'a>
sourcefn clone(&self) -> VersionInfo<'a>
fn clone(&self) -> VersionInfo<'a>
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for VersionInfo<'_>
impl Debug for VersionInfo<'_>
impl<'a> Copy for VersionInfo<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for VersionInfo<'a>
impl<'a> Send for VersionInfo<'a>
impl<'a> Sync for VersionInfo<'a>
impl<'a> Unpin for VersionInfo<'a>
impl<'a> UnwindSafe for VersionInfo<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more