pub struct SimpleFrame {
    pub instruction: u64,
    pub function: Option<String>,
    pub function_base: Option<u64>,
    pub parameter_size: Option<u32>,
    pub source_file: Option<String>,
    pub source_line: Option<u32>,
    pub source_line_base: Option<u64>,
}
Expand description

A simple implementation of FrameSymbolizer that just holds data.

Fields§

§instruction: u64

The program counter value for this frame.

§function: Option<String>

The name of the function in which the current instruction is executing.

§function_base: Option<u64>

The offset of the start of function from the module base.

§parameter_size: Option<u32>

The size, in bytes, that this function’s parameters take up on the stack.

§source_file: Option<String>

The name of the source file in which the current instruction is executing.

§source_line: Option<u32>

The 1-based index of the line number in source_file in which the current instruction is executing.

§source_line_base: Option<u64>

The offset of the start of source_line from the function base.

Implementations§

source§

impl SimpleFrame

source

pub fn with_instruction(instruction: u64) -> SimpleFrame

Instantiate a SimpleFrame with instruction pointer instruction.

Trait Implementations§

source§

impl Debug for SimpleFrame

source§

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

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

impl Default for SimpleFrame

source§

fn default() -> SimpleFrame

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

impl FrameSymbolizer for SimpleFrame

source§

fn get_instruction(&self) -> u64

Get the program counter value for this frame.
source§

fn set_function(&mut self, name: &str, base: u64, parameter_size: u32)

Set the name, base address, and parameter size of the function in which this frame is executing.
source§

fn set_source_file(&mut self, file: &str, line: u32, base: u64)

Set the source file and (1-based) line number this frame represents.
source§

fn add_inline_frame( &mut self, _name: &str, _file: Option<&str>, _line: Option<u32> )

Add an inline frame. This method can be called multiple times, in the order “outside to inside”.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 T
where 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.

source§

impl<T, U> TryFrom<U> for T
where 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 T
where 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