Skip to main content

StepView

Struct StepView 

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

One step of a StepTable.

Implementations§

Source§

impl<'a> StepView<'a>

Source

pub fn index(&self) -> usize

The step’s position in the trace.

Source

pub fn pc(&self) -> u64

Source

pub fn op(&self) -> u8

The opcode byte. A step whose backend spelled its mnemonic in a way no opcode is spelled has opcode::INVALID; StepView::mnemonic still has the spelling.

Source

pub fn mnemonic(&self) -> &'a str

The mnemonic, as the backend spelled it.

Source

pub fn gas(&self) -> u64

Source

pub fn gas_cost(&self) -> u64

The cost as the tracer reports it; see TraceStep::gas_cost.

Source

pub fn depth(&self) -> u64

Source

pub fn error(&self) -> Option<&'a str>

Source

pub fn stack(&self) -> Stack<'a>

Source

pub fn memory(&self) -> Option<Bytes>

The memory the step starts with; None when the backend did not record memory. The bytes are shared with the trace when it holds them in full, and rebuilt from the writes before the step otherwise.

Source

pub fn storage(&self) -> &'a BTreeMap<String, String>

The storage the backend reported for the step.

Source

pub fn storage_diff(&self) -> &'a BTreeMap<String, StorageChange>

The slots the step changed.

Source

pub fn transient_storage(&self) -> &'a BTreeMap<String, String>

The transient slots the step read or wrote, with their value after it.

Source

pub fn return_data(&self) -> Option<&'a str>

The return data buffer before the step, as unprefixed hex; None when empty.

Source

pub fn to_trace_step(&self) -> TraceStep

The step as a TraceStep of its own.

Trait Implementations§

Source§

impl<'a> Clone for StepView<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for StepView<'a>

Source§

impl Debug for StepView<'_>

Source§

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

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

impl Eq for StepView<'_>

Source§

impl PartialEq for StepView<'_>

Source§

fn eq(&self, other: &Self) -> bool

Two steps are equal when they record the same thing.

1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for StepView<'_>

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Writes the step as a TraceStep is written: the flat fields and the snapshot.

Auto Trait Implementations§

§

impl<'a> Freeze for StepView<'a>

§

impl<'a> RefUnwindSafe for StepView<'a>

§

impl<'a> Send for StepView<'a>

§

impl<'a> Sync for StepView<'a>

§

impl<'a> Unpin for StepView<'a>

§

impl<'a> UnsafeUnpin for StepView<'a>

§

impl<'a> UnwindSafe for StepView<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.