Struct restate_sdk_shared_core::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: Vec<(String, String)>) -> Result<Self, VMError>

source§

fn get_response_head(&self) -> ResponseHead

source§

fn notify_input(&mut self, buffer: Vec<u8>)

source§

fn notify_input_closed(&mut self)

source§

fn notify_error( &mut self, message: Cow<'static, str>, description: Cow<'static, str>, )

source§

fn take_output(&mut self) -> TakeOutputResult

source§

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

source§

fn notify_await_point(&mut self, AsyncResultHandle: AsyncResultHandle)

source§

fn take_async_result( &mut self, handle: AsyncResultHandle, ) -> Result<Option<Value>, SuspendedOrVMError>

Ok(None) means the result is not ready.
source§

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

source§

fn sys_get_state(&mut self, key: String) -> Result<AsyncResultHandle, VMError>

source§

fn sys_set_state(&mut self, key: String, value: Vec<u8>) -> Result<(), VMError>

source§

fn sys_clear_state(&mut self, key: String) -> Result<(), VMError>

source§

fn sys_clear_all_state(&mut self) -> Result<(), VMError>

source§

fn sys_sleep(&mut self, duration: Duration) -> VMResult<AsyncResultHandle>

source§

fn sys_call( &mut self, target: Target, input: Vec<u8>, ) -> VMResult<AsyncResultHandle>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

fn sys_run_enter(&mut self, name: String) -> Result<RunEnterResult, VMError>

source§

fn sys_run_exit( &mut self, value: NonEmptyValue, ) -> Result<AsyncResultHandle, VMError>

source§

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

source§

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> 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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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