Struct restate_sdk_shared_core::CoreVM
source · pub struct CoreVM { /* private fields */ }Trait Implementations§
source§impl VM for CoreVM
impl VM for CoreVM
fn new(request_headers: Vec<(String, String)>) -> Result<Self, VMError>
fn get_response_head(&self) -> ResponseHead
fn notify_input(&mut self, buffer: Vec<u8>)
fn notify_input_closed(&mut self)
fn notify_error( &mut self, message: Cow<'static, str>, description: Cow<'static, str>, )
fn take_output(&mut self) -> TakeOutputResult
fn is_ready_to_execute(&self) -> Result<bool, VMError>
fn notify_await_point(&mut self, AsyncResultHandle: AsyncResultHandle)
source§fn take_async_result(
&mut self,
handle: AsyncResultHandle,
) -> Result<Option<Value>, SuspendedOrVMError>
fn take_async_result( &mut self, handle: AsyncResultHandle, ) -> Result<Option<Value>, SuspendedOrVMError>
Ok(None) means the result is not ready.
fn sys_input(&mut self) -> Result<Input, VMError>
fn sys_get_state(&mut self, key: String) -> Result<AsyncResultHandle, VMError>
fn sys_set_state(&mut self, key: String, value: Vec<u8>) -> Result<(), VMError>
fn sys_clear_state(&mut self, key: String) -> Result<(), VMError>
fn sys_clear_all_state(&mut self) -> Result<(), VMError>
fn sys_sleep(&mut self, duration: Duration) -> VMResult<AsyncResultHandle>
fn sys_call( &mut self, target: Target, input: Vec<u8>, ) -> VMResult<AsyncResultHandle>
fn sys_send( &mut self, target: Target, input: Vec<u8>, delay: Option<Duration>, ) -> VMResult<()>
fn sys_awakeable(&mut self) -> VMResult<(String, AsyncResultHandle)>
fn sys_complete_awakeable( &mut self, id: String, value: NonEmptyValue, ) -> VMResult<()>
fn sys_get_promise(&mut self, key: String) -> VMResult<AsyncResultHandle>
fn sys_peek_promise(&mut self, key: String) -> VMResult<AsyncResultHandle>
fn sys_complete_promise( &mut self, key: String, value: NonEmptyValue, ) -> VMResult<AsyncResultHandle>
fn sys_run_enter(&mut self, name: String) -> Result<RunEnterResult, VMError>
fn sys_run_exit( &mut self, value: NonEmptyValue, ) -> Result<AsyncResultHandle, VMError>
fn sys_write_output(&mut self, value: NonEmptyValue) -> Result<(), VMError>
fn sys_end(&mut self) -> Result<(), VMError>
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> 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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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