Struct air_test_framework::execution::AirScriptExecutor
source · pub struct AirScriptExecutor<R = DefaultAirRunner> { /* private fields */ }
Expand description
A executor for an AIR script. Several executors may share same TransformedAirScript and its state.
Implementations§
source§impl AirScriptExecutor<DefaultAirRunner>
impl AirScriptExecutor<DefaultAirRunner>
sourcepub async fn from_annotated(
test_parameters: TestRunParameters,
annotated_air_script: &str,
) -> Result<Self, String>
pub async fn from_annotated( test_parameters: TestRunParameters, annotated_air_script: &str, ) -> Result<Self, String>
Simple constructor where everything is generated from the annotated_air_script.
source§impl<R: AirRunner> AirScriptExecutor<R>
impl<R: AirRunner> AirScriptExecutor<R>
pub async fn from_transformed_air_script( test_parameters: TestRunParameters, test_init_parameters: TestInitParameters, transformed_air_script: TransformedAirScript<R>, ) -> Result<Self, String>
sourcepub async fn new(
test_parameters: TestRunParameters,
common_services: Vec<MarineServiceHandle>,
extra_peers: impl IntoIterator<Item = PeerId>,
annotated_air_script: &str,
) -> Result<Self, String>
pub async fn new( test_parameters: TestRunParameters, common_services: Vec<MarineServiceHandle>, extra_peers: impl IntoIterator<Item = PeerId>, annotated_air_script: &str, ) -> Result<Self, String>
Create execution from the annotated air script.
extra_peers
allows you to define peers that are not mentioned in the annotated script
explicitly, but are used, e.g. if their names are returned from a call.
pub async fn from_network( test_parameters: TestRunParameters, test_init_parameters: TestInitParameters, network: Rc<Network<R>>, annotated_air_script: &str, ) -> Result<Self, String>
pub async fn new_with_init_parameters( test_parameters: TestRunParameters, test_init_parameters: TestInitParameters, common_services: Vec<MarineServiceHandle>, extra_peers: impl IntoIterator<Item = PeerId>, annotated_air_script: &str, ) -> Result<Self, String>
sourcepub fn execution_iter<'s, Id>(
&'s self,
peer_id: &Id,
) -> Option<impl Stream<Item = RawAVMOutcome> + 's>
pub fn execution_iter<'s, Id>( &'s self, peer_id: &Id, ) -> Option<impl Stream<Item = RawAVMOutcome> + 's>
Return Iterator for handling all the queued datas for particular peer_id.
sourcepub async fn execute_all<Id>(&self, peer_id: &Id) -> Option<Vec<RawAVMOutcome>>
pub async fn execute_all<Id>(&self, peer_id: &Id) -> Option<Vec<RawAVMOutcome>>
Process all queued datas, panicing on error.
sourcepub async fn execute_one<Id>(&self, peer_id: &Id) -> Option<RawAVMOutcome>
pub async fn execute_one<Id>(&self, peer_id: &Id) -> Option<RawAVMOutcome>
Process one queued data, panicing if it is unavalable or on error.
pub fn get_prev_data(&self, peer_id: impl Into<PeerId>) -> Data
pub fn resolve_name(&self, name: &str) -> PeerId
pub fn get_network(&self) -> Rc<Network<R>>
pub fn get_transformed_air_script(&self) -> &TransformedAirScript<R>
Auto Trait Implementations§
impl<R> Freeze for AirScriptExecutor<R>
impl<R = WasmAirRunner> !RefUnwindSafe for AirScriptExecutor<R>
impl<R = WasmAirRunner> !Send for AirScriptExecutor<R>
impl<R = WasmAirRunner> !Sync for AirScriptExecutor<R>
impl<R> Unpin for AirScriptExecutor<R>
impl<R = WasmAirRunner> !UnwindSafe for AirScriptExecutor<R>
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§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,
Query the “status” flags for the
self
file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.