[−][src]Struct symbolic_symcache::SymCacheWriter
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]
W: Write + Seek,
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]
object: &'o O,
target: W
) -> Result<W, SymCacheError> where
O: ObjectLike<'d, 'o>,
O::Error: Error + Send + Sync + 'static,
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]
&mut self,
function: Function<'_>
) -> Result<(), SymCacheError>
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,
W: RefUnwindSafe,
impl<W> Send for SymCacheWriter<W> where
W: Send,
W: Send,
impl<W> Sync for SymCacheWriter<W> where
W: Sync,
W: Sync,
impl<W> Unpin for SymCacheWriter<W> where
W: Unpin,
W: Unpin,
impl<W> UnwindSafe for SymCacheWriter<W> where
W: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,