petri

Trait PetriVmConfig

Source
pub trait PetriVmConfig: Send {
    // Required methods
    fn run_without_agent<'async_trait>(
        self: Box<Self>,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn PetriVm>>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn run_with_lazy_pipette<'async_trait>(
        self: Box<Self>,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn PetriVm>>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn run<'async_trait>(
        self: Box<Self>,
    ) -> Pin<Box<dyn Future<Output = Result<(Box<dyn PetriVm>, PipetteClient)>> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

Configuration state for a test VM.

R is the type of the struct used to interact with the VM once it is created

Required Methods§

Source

fn run_without_agent<'async_trait>( self: Box<Self>, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn PetriVm>>> + Send + 'async_trait>>
where Self: 'async_trait,

Build and boot the requested VM. Does not configure and start pipette. Should only be used for testing platforms that pipette does not support.

Source

fn run_with_lazy_pipette<'async_trait>( self: Box<Self>, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn PetriVm>>> + Send + 'async_trait>>
where Self: 'async_trait,

Run the VM, configuring pipette to automatically start, but do not wait for it to connect. This is useful for tests where the first boot attempt is expected to not succeed, but pipette functionality is still desired.

Source

fn run<'async_trait>( self: Box<Self>, ) -> Pin<Box<dyn Future<Output = Result<(Box<dyn PetriVm>, PipetteClient)>> + Send + 'async_trait>>
where Self: 'async_trait,

Run the VM, launching pipette and returning a client to it.

Implementors§