pub struct Unreal4Crash { /* private fields */ }
Expand description

Unreal Engine 4 crash file.

Implementations§

source§

impl Unreal4Crash

source

pub fn parse(slice: &[u8]) -> Result<Self, Unreal4Error>

Parses a UE4 crash dump from the original, compressed data.

To prevent unbounded decompression, consider using parse_with_limit with an explicit limit, instead.

source

pub fn parse_with_limit( slice: &[u8], limit: usize ) -> Result<Self, Unreal4Error>

Parses a UE4 crash dump from the original, compressed data up to a maximum size limit.

If files contained within the UE4 crash exceed the given size limit, this function returns Err with Unreal4ErrorKind::TooLarge.

source

pub fn name(&self) -> &str

Returns the file name of this UE4 crash.

source

pub fn directory_name(&self) -> &str

Returns the directory path of this UE4 crash.

source

pub fn files(&self) -> Unreal4FileIterator<'_>

Returns an iterator over all files within this UE4 crash dump.

source

pub fn file_count(&self) -> usize

Count of files within the UE4 crash dump.

source

pub fn file_by_index(&self, index: usize) -> Option<Unreal4File>

Returns the file at the given index.

source

pub fn file_by_type(&self, ty: Unreal4FileType) -> Option<Unreal4File>

Returns a file by its type.

If there are multiple files matching the given type, the first match is returned.

source

pub fn native_crash(&self) -> Option<Unreal4File>

Returns the native crash report contained.

source

pub fn context(&self) -> Result<Option<Unreal4Context>, Unreal4Error>

Get the Unreal4Context of this crash.

This is achieved by reading the context (xml) file If the file doesn’t exist in the crash, None is returned.

source

pub fn logs(&self, limit: usize) -> Result<Vec<Unreal4LogEntry>, Unreal4Error>

Get up to limit log entries of this crash.

Trait Implementations§

source§

impl Debug for Unreal4Crash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.