Struct CoreVM

Source
pub struct CoreVM { /* private fields */ }

Trait Implementations§

Source§

impl Debug for CoreVM

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl VM for CoreVM

Source§

fn new( request_headers: impl HeaderMap, options: VMOptions, ) -> Result<Self, Error>

Source§

fn get_response_head(&self) -> ResponseHead

Source§

fn notify_input(&mut self, buffer: Bytes)

Source§

fn notify_input_closed(&mut self)

Source§

fn notify_error( &mut self, error: Error, command_relationship: Option<CommandRelationship>, )

Source§

fn take_output(&mut self) -> TakeOutputResult

Source§

fn is_ready_to_execute(&self) -> Result<bool, Error>

Source§

fn is_completed(&self, handle: NotificationHandle) -> bool

Source§

fn do_progress( &mut self, any_handle: Vec<NotificationHandle>, ) -> VMResult<DoProgressResponse>

Source§

fn take_notification( &mut self, handle: NotificationHandle, ) -> VMResult<Option<Value>>

Source§

fn sys_input(&mut self) -> Result<Input, Error>

Source§

fn sys_state_get(&mut self, key: String) -> Result<NotificationHandle, Error>

Source§

fn sys_state_get_keys(&mut self) -> VMResult<NotificationHandle>

Source§

fn sys_state_set(&mut self, key: String, value: Bytes) -> Result<(), Error>

Source§

fn sys_state_clear(&mut self, key: String) -> Result<(), Error>

Source§

fn sys_state_clear_all(&mut self) -> Result<(), Error>

Source§

fn sys_sleep( &mut self, name: String, wake_up_time_since_unix_epoch: Duration, now_since_unix_epoch: Option<Duration>, ) -> VMResult<NotificationHandle>

Note: now_since_unix_epoch is only used for debugging purposes
Source§

fn sys_call(&mut self, target: Target, input: Bytes) -> VMResult<CallHandle>

Source§

fn sys_send( &mut self, target: Target, input: Bytes, delay: Option<Duration>, ) -> VMResult<SendHandle>

Source§

fn sys_awakeable(&mut self) -> VMResult<(String, NotificationHandle)>

Source§

fn sys_complete_awakeable( &mut self, id: String, value: NonEmptyValue, ) -> VMResult<()>

Source§

fn create_signal_handle( &mut self, signal_name: String, ) -> VMResult<NotificationHandle>

Source§

fn sys_complete_signal( &mut self, target_invocation_id: String, signal_name: String, value: NonEmptyValue, ) -> VMResult<()>

Source§

fn sys_get_promise(&mut self, key: String) -> VMResult<NotificationHandle>

Source§

fn sys_peek_promise(&mut self, key: String) -> VMResult<NotificationHandle>

Source§

fn sys_complete_promise( &mut self, key: String, value: NonEmptyValue, ) -> VMResult<NotificationHandle>

Source§

fn sys_run(&mut self, name: String) -> VMResult<NotificationHandle>

Source§

fn propose_run_completion( &mut self, notification_handle: NotificationHandle, value: RunExitResult, retry_policy: RetryPolicy, ) -> VMResult<()>

Source§

fn sys_cancel_invocation( &mut self, target_invocation_id: String, ) -> VMResult<()>

Source§

fn sys_attach_invocation( &mut self, target: AttachInvocationTarget, ) -> VMResult<NotificationHandle>

Source§

fn sys_get_invocation_output( &mut self, target: AttachInvocationTarget, ) -> VMResult<NotificationHandle>

Source§

fn sys_write_output(&mut self, value: NonEmptyValue) -> Result<(), Error>

Source§

fn sys_end(&mut self) -> Result<(), Error>

Source§

fn is_waiting_preflight(&self) -> bool

Source§

fn is_replaying(&self) -> bool

Source§

fn is_processing(&self) -> bool

Returns true if the state machine is in processing state
Source§

fn last_command_index(&self) -> i64

Returns last command index. Returns -1 if there was no progress in the journal.

Auto Trait Implementations§

§

impl !Freeze for CoreVM

§

impl RefUnwindSafe for CoreVM

§

impl Send for CoreVM

§

impl Sync for CoreVM

§

impl Unpin for CoreVM

§

impl UnwindSafe for CoreVM

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more