pub enum ReproInfo<'a> {
TimeDateStamp(u32),
Buffer {
length: u32,
buffer: &'a [u8],
},
}Expand description
Represents the reproducible build (Repro) information extracted from a PE (Portable Executable) file.
The Repro information differs based on the compiler used to build the executable:
- For MSVC (Microsoft Visual C++), the Repro information is written directly into the raw data as a 32-byte hash.
- For Clang/(correctly, LLD linker), there is no dedicated raw data for the Repro information. Instead, the
ImageDebugDirectory::time_date_stampfield functions as a hash, providing a unique identifier for the reproducible build.
Variants§
TimeDateStamp(u32)
Represents a hash stored in the ImageDebugDirectory::time_date_stamp field.
This variant is used primarily for executables built with Clang/LLD, where the
ImageDebugDirectory::time_date_stamp acts as the Repro hash.
Buffer
Represents a buffer containing the 32-byte Repro hash.
This variant is used for MSVC-built executables, where the Repro hash is directly stored as raw data in the debug directory.
Implementations§
Source§impl<'a> ReproInfo<'a>
impl<'a> ReproInfo<'a>
pub fn parse(bytes: &'a [u8], idd: &ImageDebugDirectory) -> Result<Self>
pub fn parse_with_opts( bytes: &'a [u8], idd: &ImageDebugDirectory, opts: &ParseOptions, ) -> Result<Self>
Trait Implementations§
impl<'a> Copy for ReproInfo<'a>
Source§impl<'a> PartialEq for ReproInfo<'a>
impl<'a> PartialEq for ReproInfo<'a>
impl<'a> StructuralPartialEq for ReproInfo<'a>
Auto Trait Implementations§
impl<'a> Freeze for ReproInfo<'a>
impl<'a> RefUnwindSafe for ReproInfo<'a>
impl<'a> Send for ReproInfo<'a>
impl<'a> Sync for ReproInfo<'a>
impl<'a> Unpin for ReproInfo<'a>
impl<'a> UnsafeUnpin for ReproInfo<'a>
impl<'a> UnwindSafe for ReproInfo<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more