Skip to main content

DebugProgram

Struct DebugProgram 

Source
pub struct DebugProgram {
    pub info: EthdebugInfo,
    pub resources: Value,
    pub source_contents: BTreeMap<u64, String>,
    pub source_files: BTreeMap<u64, PathBuf>,
    pub legacy: bool,
    pub storage_layout: Option<StorageLayout>,
    pub transient_storage_layout: Option<StorageLayout>,
    pub missing_sources: Vec<String>,
}
Expand description

One contract’s debug information as loaded from its artifacts.

Fields§

§info: EthdebugInfo§resources: Value

The ETHDebug resources record: the compilation, types, and pointers.

§source_contents: BTreeMap<u64, String>

Source text by source id, for every source that could be read.

§source_files: BTreeMap<u64, PathBuf>

The file each source was read from; a source taken from the compilation record has none.

§legacy: bool

True when the program came from a legacy srcmap rather than ETHDebug.

§storage_layout: Option<StorageLayout>

The contract’s storage layout, when it was compiled with --storage-layout.

§transient_storage_layout: Option<StorageLayout>

Where its transient state variables live, from --transient-storage-layout.

§missing_sources: Vec<String>

Sources the artifact names that could not be read, so a frontend can say why its lines are missing instead of degrading to an opcode view without a word.

Implementations§

Source§

impl DebugProgram

Source

pub const fn code_generator(&self) -> CodeGenerator

The code generator the program came from. A legacy srcmap is taken to come from the legacy pipeline, which is the only one that emits nothing else; ETHDebug comes from solc’s via-IR pipeline or from a compiler built on IR.

Trait Implementations§

Source§

impl Clone for DebugProgram

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 Debug for DebugProgram

Source§

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

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

impl Eq for DebugProgram

Source§

impl PartialEq for DebugProgram

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DebugProgram

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> 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.