[−][src]Struct symbolic_minidump::cfi::AsciiCfiWriter
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,
W: Send,
impl<W> Sync for AsciiCfiWriter<W> where
W: Sync,
W: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.