pub struct SourceLocal {
pub name: String,
pub ty: String,
pub location: Option<String>,
pub declaration: ByteRange,
pub statement: ByteRange,
pub position: usize,
pub scope: ByteRange,
}Expand description
A variable a function declares in its source: a return parameter or a local.
The spans are what ties the variable to the trace. solc’s legacy code generator reserves
the variable’s stack slot under declaration, the type [location] name text, as the
first instructions of statement; the slot lives until execution leaves scope.
Fields§
§name: String§ty: StringThe type without its data location, such as uint256 or string.
location: Option<String>The data location as declared, when the type has one.
declaration: ByteRange§statement: ByteRangeThe declaration statement, from its first token to before its ;.
position: usizeThe variable’s index among those its statement declares: each takes the next slot.
scope: ByteRangeImplementations§
Source§impl SourceLocal
impl SourceLocal
Sourcepub fn declared_type(&self) -> String
pub fn declared_type(&self) -> String
The type as declared, with its data location.
Trait Implementations§
Source§impl Clone for SourceLocal
impl Clone for SourceLocal
Source§impl Debug for SourceLocal
impl Debug for SourceLocal
Source§impl<'de> Deserialize<'de> for SourceLocal
impl<'de> Deserialize<'de> for SourceLocal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SourceLocal
Source§impl PartialEq for SourceLocal
impl PartialEq for SourceLocal
Source§impl Serialize for SourceLocal
impl Serialize for SourceLocal
impl StructuralPartialEq for SourceLocal
Auto Trait Implementations§
impl Freeze for SourceLocal
impl RefUnwindSafe for SourceLocal
impl Send for SourceLocal
impl Sync for SourceLocal
impl Unpin for SourceLocal
impl UnsafeUnpin for SourceLocal
impl UnwindSafe for SourceLocal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more