Skip to main content

Output

Enum Output 

Source
pub enum Output {
Show 19 variants Loaded { steps: usize, contracts: Vec<LoadedContract>, }, Stop(Stop), Message { level: Level, text: String, note: Option<String>, }, Breakpoint { event: BreakpointEvent, id: u32, label: String, }, Breakpoints { breakpoints: Vec<BreakpointInfo>, }, Backtrace { warning: Option<String>, note: Option<String>, frames: Vec<FrameInfo>, }, Listing { path: String, current_line: u64, lines: Vec<ListedLine>, }, Stack { words: Vec<String>, shown: usize, }, Memory(MemoryInfo), Storage { address: Option<String>, slots: Vec<SlotInfo>, }, TransientStorage { address: Option<String>, slots: Vec<SlotInfo>, }, Calldata { bytes: usize, data: String, }, ReturnData { bytes: usize, data: String, }, Variables { warning: Option<String>, pc: u64, locals: Vec<VariableInfo>, unavailable: Option<String>, state: StateInfo, transient: Vec<VariableInfo>, }, Variable { warning: Option<String>, variable: VariableInfo, }, Resources { contracts: Vec<ResourceInfo>, json: bool, }, Help { lines: Vec<String>, }, Tui, Quit,
}
Expand description

One item of a command’s answer.

Variants§

§

Loaded

What was loaded, said once when a session starts.

Fields

§steps: usize
§contracts: Vec<LoadedContract>

The contracts whose sources are loaded, name and address.

§

Stop(Stop)

Where the debugger stopped, and why.

§

Message

A one-line message, with an optional note under it.

Fields

§level: Level
§text: String
§

Breakpoint

A breakpoint was set or cleared.

Fields

§id: u32
§label: String
§

Breakpoints

Fields

§breakpoints: Vec<BreakpointInfo>
§

Backtrace

Fields

§warning: Option<String>

Said once a session, when frames carry arguments read off the stack: a warning line and the note under it.

§frames: Vec<FrameInfo>
§

Listing

Fields

§path: String
§current_line: u64
§

Stack

Fields

§words: Vec<String>

The whole stack, bottom first: index i is what vars calls stack+i.

§shown: usize

How many words, from the top, the user asked to see.

§

Memory(MemoryInfo)

§

Storage

Fields

§address: Option<String>
§slots: Vec<SlotInfo>
§

TransientStorage

The transient storage slots known at a step; every other slot is zero.

Fields

§address: Option<String>
§slots: Vec<SlotInfo>
§

Calldata

Fields

§bytes: usize
§data: String
§

ReturnData

The return data buffer at a step, 0x-prefixed.

Fields

§bytes: usize
§data: String
§

Variables

The variables in scope, and the state variables.

Fields

§warning: Option<String>
§pc: u64
§unavailable: Option<String>

Why no locals could be read, when none could.

§transient: Vec<VariableInfo>

The transient state variables, when the contract has a transient layout.

§

Variable

One variable, from print.

Fields

§warning: Option<String>
§variable: VariableInfo
§

Resources

The contracts whose debug resources are loaded.

Fields

§contracts: Vec<ResourceInfo>
§json: bool

Whether the user asked for JSON, so a text renderer prints it as such.

§

Help

Fields

§lines: Vec<String>
§

Tui

The user asked for the full-screen view.

§

Quit

The user asked to leave.

Trait Implementations§

Source§

impl Clone for Output

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 Output

Source§

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

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

impl Eq for Output

Source§

impl PartialEq for Output

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 Serialize for Output

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Output

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.