[][src]Struct symbolic::minidump::cfi::CfiCache

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

A cache file for call frame information (CFI).

The default way to use this cache is to construct it from an Object and save it to a file. Then, load it from the file and pass it to the minidump processor.

use std::fs::File;
use symbolic_common::ByteView;
use symbolic_debuginfo::Object;
use symbolic_minidump::cfi::CfiCache;

let view = ByteView::open("/path/to/object")?;
let object = Object::parse(&view)?;
let cache = CfiCache::from_object(&object)?;
cache.write_to(File::create("my.cficache")?)?;
use symbolic_common::ByteView;
use symbolic_minidump::cfi::CfiCache;

let view = ByteView::open("my.cficache")?;
let cache = CfiCache::from_bytes(view)?;

Implementations

impl CfiCache<'static>[src]

pub fn from_object(object: &Object<'_>) -> Result<CfiCache<'static>, CfiError>[src]

Construct a CFI cache from an Object.

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

pub fn from_bytes(byteview: ByteView<'a>) -> Result<CfiCache<'a>, CfiError>[src]

Load a symcache from a ByteView.

pub fn version(&self) -> u32[src]

Returns the cache file format version.

pub fn is_latest(&self) -> bool[src]

Returns whether this cache is up-to-date.

pub fn as_slice(&self) -> &[u8]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns the raw buffer of the cache file.

pub fn write_to<W>(&self, writer: W) -> Result<(), Error> where
    W: Write
[src]

Writes the cache to the given writer.

Auto Trait Implementations

impl<'a> RefUnwindSafe for CfiCache<'a>[src]

impl<'a> Send for CfiCache<'a>[src]

impl<'a> Sync for CfiCache<'a>[src]

impl<'a> Unpin for CfiCache<'a>[src]

impl<'a> UnwindSafe for CfiCache<'a>[src]

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.