pub struct DummyVm { /* private fields */ }
Expand description
Defines a Dummy VM that may be used to test.
Implementations§
source§impl DummyVm
impl DummyVm
Trait Implementations§
source§impl Vm for DummyVm
impl Vm for DummyVm
source§fn store_state(
this: &Arc<RwLock<Self>>,
state: RunState<Self::GlobalState>,
) -> Result<(), VmError>
fn store_state( this: &Arc<RwLock<Self>>, state: RunState<Self::GlobalState>, ) -> Result<(), VmError>
A function that stores the given runtime state information in the parent struct.
This is important and will be used later.
§Arguments
state
: The current state of the workflow we have executed.
§Returns
Nothing, but should change the internals to return this state later upon request.
§Errors
This function may error for its own reasons.
source§fn load_state(
this: &Arc<RwLock<Self>>,
) -> Result<RunState<Self::GlobalState>, VmError>
fn load_state( this: &Arc<RwLock<Self>>, ) -> Result<RunState<Self::GlobalState>, VmError>
source§type GlobalState = DummyState
type GlobalState = DummyState
The type of the thread-global extension to the runtime state.
source§type LocalState = ()
type LocalState = ()
The type of the thread-local extension to the runtime state.
source§fn new_state(custom: Self::GlobalState) -> RunState<Self::GlobalState>
fn new_state(custom: Self::GlobalState) -> RunState<Self::GlobalState>
Initializes a new global state based on the given custom part. Read more
source§fn run<'life0, 'async_trait, P>(
this: Arc<RwLock<Self>>,
snippet: Workflow,
prof: ProfileScopeHandle<'life0>,
) -> Pin<Box<dyn Future<Output = Result<FullValue, VmError>> + Send + 'async_trait>>where
Self: Sync + Send + 'async_trait,
P: 'async_trait + VmPlugin<GlobalState = Self::GlobalState, LocalState = Self::LocalState>,
'life0: 'async_trait,
fn run<'life0, 'async_trait, P>(
this: Arc<RwLock<Self>>,
snippet: Workflow,
prof: ProfileScopeHandle<'life0>,
) -> Pin<Box<dyn Future<Output = Result<FullValue, VmError>> + Send + 'async_trait>>where
Self: Sync + Send + 'async_trait,
P: 'async_trait + VmPlugin<GlobalState = Self::GlobalState, LocalState = Self::LocalState>,
'life0: 'async_trait,
Runs the given workflow, possibly asynchronously (if a parallel is encountered / there are external functions calls and the given closure runs this asynchronously.) Read more
Auto Trait Implementations§
impl Freeze for DummyVm
impl RefUnwindSafe for DummyVm
impl Send for DummyVm
impl Sync for DummyVm
impl Unpin for DummyVm
impl UnwindSafe for DummyVm
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request