pub struct ModuleStateMap {
pub local_functions: BTreeMap<usize, FunctionStateMap>,
pub total_size: usize,
}Expand description
A map of module state.
Fields§
§local_functions: BTreeMap<usize, FunctionStateMap>Local functions.
total_size: usizeTotal size.
Implementations§
Source§impl ModuleStateMap
impl ModuleStateMap
Sourcepub fn lookup_ip<F: FnOnce(&FunctionStateMap) -> &BTreeMap<usize, OffsetInfo>>(
&self,
ip: usize,
base: usize,
offset_table_provider: F,
) -> Option<(&FunctionStateMap, MachineState)>
pub fn lookup_ip<F: FnOnce(&FunctionStateMap) -> &BTreeMap<usize, OffsetInfo>>( &self, ip: usize, base: usize, offset_table_provider: F, ) -> Option<(&FunctionStateMap, MachineState)>
Looks up an ip from self using the given ip, base, and offset table provider.
Sourcepub fn lookup_call_ip(
&self,
ip: usize,
base: usize,
) -> Option<(&FunctionStateMap, MachineState)>
pub fn lookup_call_ip( &self, ip: usize, base: usize, ) -> Option<(&FunctionStateMap, MachineState)>
Looks up a call ip from self using the given ip and base values.
Sourcepub fn lookup_trappable_ip(
&self,
ip: usize,
base: usize,
) -> Option<(&FunctionStateMap, MachineState)>
pub fn lookup_trappable_ip( &self, ip: usize, base: usize, ) -> Option<(&FunctionStateMap, MachineState)>
Looks up a trappable ip from self using the given ip and base values.
Sourcepub fn lookup_loop_ip(
&self,
ip: usize,
base: usize,
) -> Option<(&FunctionStateMap, MachineState)>
pub fn lookup_loop_ip( &self, ip: usize, base: usize, ) -> Option<(&FunctionStateMap, MachineState)>
Looks up a loop ip from self using the given ip and base values.
Trait Implementations§
Source§impl BorshDeserialize for ModuleStateMap
impl BorshDeserialize for ModuleStateMap
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for ModuleStateMap
impl BorshSerialize for ModuleStateMap
Source§impl Clone for ModuleStateMap
impl Clone for ModuleStateMap
Source§impl Debug for ModuleStateMap
impl Debug for ModuleStateMap
Source§impl<'de> Deserialize<'de> for ModuleStateMap
impl<'de> Deserialize<'de> for ModuleStateMap
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
Auto Trait Implementations§
impl Freeze for ModuleStateMap
impl RefUnwindSafe for ModuleStateMap
impl Send for ModuleStateMap
impl Sync for ModuleStateMap
impl Unpin for ModuleStateMap
impl UnsafeUnpin for ModuleStateMap
impl UnwindSafe for ModuleStateMap
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