pub trait MethodVarAccess<'de, 's> {
type Error: Error;
type ContentDeserializer: Deserializer<'de, Error = Self::Error>;
// Required methods
fn src(&self) -> Option<&'s str>;
fn dst(&self) -> Option<impl Iterator<Item = &'s str>>;
fn lv_index(&self) -> Option<usize>;
fn lvt_row_index(&self) -> Option<usize>;
fn op_idx(&self) -> Option<(usize, Option<usize>)>;
fn content(self) -> Self::ContentDeserializer;
}Expand description
Method argument name, pos, slot and comment accessor.
Required Associated Types§
Sourcetype ContentDeserializer: Deserializer<'de, Error = Self::Error>
type ContentDeserializer: Deserializer<'de, Error = Self::Error>
Type of deserializer of the element’s contents.
Required Methods§
Sourcefn lv_index(&self) -> Option<usize>
fn lv_index(&self) -> Option<usize>
The local variable index of this variable in the current method.
Starts at the last parameter’s slot plus wideness, and increase by 1, or by 2 if it’s a double-wide primitive.
Also known as slot.
Sourcefn lvt_row_index(&self) -> Option<usize>
fn lvt_row_index(&self) -> Option<usize>
The index of variable in the method’s local variable table.
Sourcefn op_idx(&self) -> Option<(usize, Option<usize>)>
fn op_idx(&self) -> Option<(usize, Option<usize>)>
Required for cases when the lvIndex alone doesn’t uniquely identify a local variable. This is the case when variables get re-defined later on, in which case most decompilers opt to not re-define the existing var, but instead generate a new one (with both sharing the same
lv_index).
(from mapping-io)
Sourcefn content(self) -> Self::ContentDeserializer
fn content(self) -> Self::ContentDeserializer
Returns the content deserializer for further deserialization of this method.
It may only contain comments.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".