[][src]Struct symbolic_minidump::cfi::AsciiCfiWriter

pub struct AsciiCfiWriter<W: Write> { /* fields omitted */ }

A service that converts call frame information (CFI) from an object file to Breakpad ASCII format and writes it to the given writer.

The default way to use this writer is to create a writer, pass it to the AsciiCfiWriter and then process an object:

use symbolic_common::ByteView;
use symbolic_debuginfo::Object;
use symbolic_minidump::cfi::AsciiCfiWriter;

let view = ByteView::open("/path/to/object")?;
let object = Object::parse(&view)?;

let mut writer = Vec::new();
AsciiCfiWriter::new(&mut writer).process(&object)?;

For writers that implement Default, there is a convenience method that creates an instance and returns it right away:

use symbolic_common::ByteView;
use symbolic_debuginfo::Object;
use symbolic_minidump::cfi::AsciiCfiWriter;

let view = ByteView::open("/path/to/object")?;
let object = Object::parse(&view)?;

let buffer = AsciiCfiWriter::<Vec<u8>>::transform(&object)?;

Methods

impl<W: Write> AsciiCfiWriter<W>[src]

pub fn new(inner: W) -> Self[src]

Creates a new AsciiCfiWriter that outputs to a writer.

pub fn process(&mut self, object: &Object) -> Result<(), CfiError>[src]

Extracts CFI from the given object file.

pub fn into_inner(self) -> W[src]

Returns the wrapped writer from this instance.

impl<W: Write + Default> AsciiCfiWriter<W>[src]

pub fn transform(object: &Object) -> Result<W, CfiError>[src]

Extracts CFI from the given object and pipes it to a new writer instance.

Auto Trait Implementations

impl<W> Send for AsciiCfiWriter<W> where
    W: Send

impl<W> Sync for AsciiCfiWriter<W> where
    W: Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Erased for T