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 runtime_snapshot(
&self,
) -> Result<StatefulRuntimeSnapshotV3, StatefulHandlerErrorV2>
pub fn runtime_snapshot( &self, ) -> Result<StatefulRuntimeSnapshotV3, StatefulHandlerErrorV2>
Return the handler state plus the durable decision ledger.
Sourcepub fn restore_runtime_snapshot(
&self,
snapshot: StatefulRuntimeSnapshotV3,
) -> Result<(), StatefulHandlerErrorV2>
pub fn restore_runtime_snapshot( &self, snapshot: StatefulRuntimeSnapshotV3, ) -> Result<(), StatefulHandlerErrorV2>
Restore handler state and delayed feedback atomically.
Sourcepub fn stage_candidate(
&self,
snapshot: StatefulStateSnapshotV2,
) -> Result<(), StatefulHandlerErrorV2>
pub fn stage_candidate( &self, snapshot: StatefulStateSnapshotV2, ) -> Result<(), StatefulHandlerErrorV2>
Validate and retain a candidate without activating it.
Sourcepub fn promote_candidate(&self) -> Result<u64, StatefulHandlerErrorV2>
pub fn promote_candidate(&self) -> Result<u64, StatefulHandlerErrorV2>
Atomically activate a previously staged candidate.
Sourcepub fn rollback_previous_good(&self) -> Result<u64, StatefulHandlerErrorV2>
pub fn rollback_previous_good(&self) -> Result<u64, StatefulHandlerErrorV2>
Restore the most recent previous-good state after a failed activation.
Sourcepub fn restore_snapshot_with_migration(
&self,
snapshot: StatefulStateSnapshotV2,
migrator: &dyn StatefulStateMigratorV1,
) -> Result<(), StatefulHandlerErrorV2>
pub fn restore_snapshot_with_migration( &self, snapshot: StatefulStateSnapshotV2, migrator: &dyn StatefulStateMigratorV1, ) -> Result<(), StatefulHandlerErrorV2>
Migrate a snapshot without destructive in-place mutation.
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.
Sourcepub fn handle_preview_at(
&self,
envelope: EnvelopeV3,
now_unix_ms: u64,
) -> RuntimeResponseV3Preview
pub fn handle_preview_at( &self, envelope: EnvelopeV3, now_unix_ms: u64, ) -> RuntimeResponseV3Preview
Handle the additive Preview response surface. The frozen v3 response
type remains available through handle_at for library consumers.
pub fn handle_preview_json_at( &self, message: &[u8], now_unix_ms: u64, ) -> RuntimeResponseV3Preview
Sourcepub fn diagnostics_at(
&self,
observed_at_unix_ms: u64,
) -> Result<RuntimeDiagnosticsV1, StatefulHandlerErrorV2>
pub fn diagnostics_at( &self, observed_at_unix_ms: u64, ) -> Result<RuntimeDiagnosticsV1, StatefulHandlerErrorV2>
Return structured diagnostics using a caller-provided timestamp.
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
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> ⓘ
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> ⓘ
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