Struct symbolic_symcache::SymCacheWriter [−][src]
pub struct SymCacheWriter<W> { /* fields omitted */ }
Expand description
A high level writer that can construct SymCaches.
When using this writer directly, make sure 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
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,
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,
Converts an entire object into a SymCache.
Any object which implements ObjectLike
can be written into a
SymCache
by this function. This already implicictly
calls SymCacheWriter::finish
, thus consuming the writer.
Constructs a new SymCacheWriter
and writes the preamble.
Sets the debug identifier of this SymCache.
Adds a new symbol to this SymCache.
Symbols must be added in ascending order using this method. This will emit a function record internally.
Cleans up a function by recursively removing all empty inlinees, then inserts it into the writer.
Does nothing if the function is empty itself. Functions must be added in ascending order using this method. This emits a function record for this function and for each inlinee recursively.
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
Mutably borrows from an owned value. Read more
impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
pub fn extract_context(self, _original_input: I)
pub fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original input to the nom parser, extract more the useful context information. Read more
pub fn recreate_context(_original_input: I, tail: I) -> I
pub fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom, recreate a context in the original string where the error occurred. Read more