pub struct SnapshotRuntime { /* private fields */ }Expand description
Per-server snapshot coordination shared by its parser, projector, snapshot manager, and readiness endpoint.
The generated parser hooks use scope so their existing
argument-free calls cannot accidentally bind to another server running in
the same process.
Implementations§
Source§impl SnapshotRuntime
impl SnapshotRuntime
Sourcepub async fn scope<F>(&self, future: F) -> F::Outputwhere
F: Future,
pub async fn scope<F>(&self, future: F) -> F::Outputwhere
F: Future,
Run a generated parser future with this server’s snapshot state.
Sourcepub fn register_runtime(
&self,
vm: Arc<StdMutex<VmContext>>,
slot_tracker: SlotTracker,
) -> SnapshotBarrier
pub fn register_runtime( &self, vm: Arc<StdMutex<VmContext>>, slot_tracker: SlotTracker, ) -> SnapshotBarrier
Associate the parser’s VM and slot tracker with this server only.
Sourcepub fn take_restored(&self) -> Option<RestoredState>
pub fn take_restored(&self) -> Option<RestoredState>
Consume this server’s restored VM state exactly once.
Sourcepub fn resume_gate_ready(&self) -> bool
pub fn resume_gate_ready(&self) -> bool
Returns true unless this server’s watermark resume is still catching
up to its observed slot tip.
Trait Implementations§
Source§impl Clone for SnapshotRuntime
impl Clone for SnapshotRuntime
Auto Trait Implementations§
impl !RefUnwindSafe for SnapshotRuntime
impl !UnwindSafe for SnapshotRuntime
impl Freeze for SnapshotRuntime
impl Send for SnapshotRuntime
impl Sync for SnapshotRuntime
impl Unpin for SnapshotRuntime
impl UnsafeUnpin for SnapshotRuntime
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