[][src]Struct symbolic_symcache::SymCacheWriter

pub struct SymCacheWriter<W> { /* fields omitted */ }

A high level writer that can construct SymCaches.

When using this writer directly, ensure to call finish at the end, so that all segments are written to the underlying writer and the header is fixed up with the references. Since segments are consecutive chunks of memory, this can only be done once at the end of the writing process.

Implementations

impl<W> SymCacheWriter<W> where
    W: Write + Seek
[src]

pub fn write_object<'d, 'o, O>(
    object: &'o O,
    target: W
) -> Result<W, SymCacheError> where
    O: ObjectLike<'d, 'o>,
    O::Error: Error + Send + Sync + 'static, 
[src]

Converts an entire object into a SymCache.

pub fn new(writer: W) -> Result<Self, SymCacheError>[src]

Constructs a new SymCacheWriter and writes the preamble.

pub fn set_arch(&mut self, arch: Arch)[src]

Sets the CPU architecture of this SymCache.

pub fn set_debug_id(&mut self, debug_id: DebugId)[src]

Sets the debug identifier of this SymCache.

pub fn add_symbol(&mut self, symbol: Symbol<'_>) -> Result<(), SymCacheError>[src]

Adds a new symbol to this SymCache.

Symbols must be added in ascending order using this method. This will emit a function record internally.

pub fn add_function(
    &mut self,
    function: Function<'_>
) -> Result<(), SymCacheError>
[src]

Adds a function to this SymCache.

Functions must be added in ascending order using this method. This emits a function record for this function and for each inlinee recursively.

pub fn finish(self) -> Result<W, SymCacheError>[src]

Persists all open segments to the writer and fixes up the header.

Auto Trait Implementations

impl<W> RefUnwindSafe for SymCacheWriter<W> where
    W: RefUnwindSafe

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

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

impl<W> Unpin for SymCacheWriter<W> where
    W: Unpin

impl<W> UnwindSafe for SymCacheWriter<W> where
    W: 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.