Struct air_test_utils::prelude::InterpreterData
source · pub struct InterpreterData {
pub versions: Versions,
pub trace: ExecutionTrace,
pub global_streams: HashMap<String, u32, RandomState>,
pub restricted_streams: HashMap<String, HashMap<AirPos, Vec<u32, Global>, RandomState>, RandomState>,
pub last_call_request_id: u32,
pub cid_info: CidInfo,
}
Expand description
The AIR interpreter could be considered as a function f(prev_data: InterpreterData, current_data: InterpreterData, … ) -> (result_data: InterpreterData, …). This function receives prev and current data and produces a result data. All these data have the following format.
Fields§
§versions: Versions
Versions of data and an interpreter produced this data.
trace: ExecutionTrace
Trace of AIR execution, which contains executed call, par, fold, and ap states.
global_streams: HashMap<String, u32, RandomState>
Contains maximum generation for each global stream. This info will be used while merging values in streams. This field is also needed for backward compatibility with <= 0.2.1 versions.
restricted_streams: HashMap<String, HashMap<AirPos, Vec<u32, Global>, RandomState>, RandomState>
Contains maximum generation for each private stream. This info will be used while merging values in streams.
last_call_request_id: u32
Last exposed to a peer call request id. All next call request ids will be bigger than this.
cid_info: CidInfo
CID-to-somethings mappings.
Implementations§
source§impl InterpreterData
impl InterpreterData
pub fn new(interpreter_version: Version) -> InterpreterData
pub fn from_execution_result( trace: ExecutionTrace, streams: HashMap<String, u32, RandomState>, restricted_streams: HashMap<String, HashMap<AirPos, Vec<u32, Global>, RandomState>, RandomState>, cid_info: CidInfo, last_call_request_id: u32, interpreter_version: Version ) -> InterpreterData
sourcepub fn try_from_slice(slice: &[u8]) -> Result<InterpreterData, Error>
pub fn try_from_slice(slice: &[u8]) -> Result<InterpreterData, Error>
Tries to de InterpreterData from slice according to the data version.
Trait Implementations§
source§impl Clone for InterpreterData
impl Clone for InterpreterData
source§fn clone(&self) -> InterpreterData
fn clone(&self) -> InterpreterData
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InterpreterData
impl Debug for InterpreterData
source§impl<'de> Deserialize<'de> for InterpreterData
impl<'de> Deserialize<'de> for InterpreterData
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<InterpreterData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<InterpreterData, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
source§impl Serialize for InterpreterData
impl Serialize for InterpreterData
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Auto Trait Implementations§
impl RefUnwindSafe for InterpreterData
impl !Send for InterpreterData
impl !Sync for InterpreterData
impl Unpin for InterpreterData
impl UnwindSafe for InterpreterData
Blanket Implementations§
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where T: AsFilelike,
self
file descriptor.