pub struct StatefulRuntimeEngineV3 { /* private fields */ }Expand description
Preview Runtime V3 engine for Stateful Handler ABI v2.
Implementations§
Source§impl StatefulRuntimeEngineV3
impl StatefulRuntimeEngineV3
pub fn new( config: StatefulRuntimeConfigV3, handler: Arc<dyn StatefulHandlerV2>, ) -> Result<Self, StatefulHandlerErrorV2>
Sourcepub fn restore_snapshot(
&self,
snapshot: StatefulStateSnapshotV2,
) -> Result<(), StatefulHandlerErrorV2>
pub fn restore_snapshot( &self, snapshot: StatefulStateSnapshotV2, ) -> Result<(), StatefulHandlerErrorV2>
Restore a previously validated Runtime-owned state atomically.
pub fn snapshot( &self, ) -> Result<StatefulStateSnapshotV2, StatefulHandlerErrorV2>
Sourcepub fn handle_at(
&self,
envelope: EnvelopeV3,
now_unix_ms: u64,
) -> RuntimeResponseV3
pub fn handle_at( &self, envelope: EnvelopeV3, now_unix_ms: u64, ) -> RuntimeResponseV3
Handle one request at a caller-supplied clock value. No system clock is read by the library.
Sourcepub fn handle_json_at(
&self,
message: &[u8],
now_unix_ms: u64,
) -> RuntimeResponseV3
pub fn handle_json_at( &self, message: &[u8], now_unix_ms: u64, ) -> RuntimeResponseV3
Decode and handle one bounded IPC V3 JSON message. Malformed and oversized messages are rejected before a handler can observe them. The caller supplies the clock so replay and tests remain deterministic.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StatefulRuntimeEngineV3
impl !RefUnwindSafe for StatefulRuntimeEngineV3
impl !UnwindSafe for StatefulRuntimeEngineV3
impl Send for StatefulRuntimeEngineV3
impl Sync for StatefulRuntimeEngineV3
impl Unpin for StatefulRuntimeEngineV3
impl UnsafeUnpin for StatefulRuntimeEngineV3
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> 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