pub struct SymCacheConverter<'a> { /* private fields */ }
Expand description

The SymCache Converter.

This can convert data in various source formats to an intermediate representation, which can then be serialized to disk via its serialize method.

Implementations§

source§

impl<'a> SymCacheConverter<'a>

source

pub fn new() -> Self

Creates a new Converter.

source

pub fn add_transformer<T>(&mut self, t: T)where T: Transformer + 'a,

Adds a new transform::Transformer to this SymCacheConverter.

Every transform::Function and transform::SourceLocation will be passed through this transformer before it is written to the SymCache.

source

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

Sets the CPU architecture of this SymCache.

source

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

Sets the debug identifier of this SymCache.

source

pub fn process_object<'d, 'o, O>(&mut self, object: &'o O) -> Result<(), Error>where O: ObjectLike<'d, 'o>, O::Error: Error + Send + Sync + 'static,

This processes the given ObjectLike object, collecting all its functions and line information into the converter.

source

pub fn process_symbolic_function(&mut self, function: &Function<'_>)

Processes an individual Function, adding its line information to the converter.

source

pub fn process_symbolic_symbol(&mut self, symbol: &Symbol<'_>)

Processes an individual Symbol.

source

pub fn serialize<W: Write>(self, writer: &mut W) -> Result<()>

Serialize the converted data.

This writes the SymCache binary format into the given Write.

Trait Implementations§

source§

impl<'a> Debug for SymCacheConverter<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Default for SymCacheConverter<'a>

source§

fn default() -> SymCacheConverter<'a>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for SymCacheConverter<'a>

§

impl<'a> !Send for SymCacheConverter<'a>

§

impl<'a> !Sync for SymCacheConverter<'a>

§

impl<'a> Unpin for SymCacheConverter<'a>

§

impl<'a> !UnwindSafe for SymCacheConverter<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<I, T> ExtractContext<I, ()> for T

§

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
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<I> RecreateContext<I> for I

§

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
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more