[][src]Struct minidump::Minidump

pub struct Minidump<'a, T> where
    T: Deref<Target = [u8]> + 'a, 
{ pub header: MINIDUMP_HEADER, pub endian: Endian, // some fields omitted }

An index into the contents of a minidump.

The Minidump struct represents the parsed header and indices contained at the start of a minidump file. It can be instantiated by calling the Minidump::read or Minidump::read_path methods.

Examples

use minidump::Minidump;

let dump = Minidump::read_path("../testdata/test.dmp")?;

Fields

header: MINIDUMP_HEADER

The raw minidump header from the file.

endian: Endian

The endianness of this minidump file.

Implementations

impl<'a> Minidump<'a, Mmap>[src]

pub fn read_path<P>(path: P) -> Result<Minidump<'a, Mmap>, Error> where
    P: AsRef<Path>, 
[src]

Read a Minidump from a Path to a file on disk.

See the type definition for an example.

impl<'a, T> Minidump<'a, T> where
    T: Deref<Target = [u8]> + 'a, 
[src]

pub fn read(data: T) -> Result<Minidump<'a, T>, Error>[src]

Read a Minidump from the provided data.

Typically this will be a Vec<u8> or &[u8] with the full contents of the minidump, but you can also use something like memmap::Mmap.

pub fn get_stream<'b, S>(&'b self) -> Result<S, Error> where
    S: MinidumpStream<'a>,
    'b: 'a, 
[src]

Get a known stream of data from the minidump.

For streams known to this module whose types implement the MinidumpStream trait, this method allows reading the stream data as a specific type.

pub fn get_raw_stream<'b, S>(
    &'b self,
    stream_type: S
) -> Result<&'a [u8], Error> where
    S: Into<u32>,
    'b: 'a, 
[src]

Get a stream of raw data from the minidump.

This can be used to get the contents of arbitrary minidump streams. For streams of known types you almost certainly want to use get_stream instead.

pub fn print<W: Write>(&self, f: &mut W) -> Result<()>[src]

Write a verbose description of the Minidump to f.

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for Minidump<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for Minidump<'a, T> where
    T: Send

impl<'a, T> Sync for Minidump<'a, T> where
    T: Sync

impl<'a, T> Unpin for Minidump<'a, T> where
    T: Unpin

impl<'a, T> UnwindSafe for Minidump<'a, T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

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