pub struct FullSuspendedState {
pub total_cycles: Cycle,
pub iteration_cycles: Cycle,
pub next_vm_id: VmId,
pub next_fd_slot: u64,
pub vms: Vec<(VmId, VmState, Snapshot2<DataPieceId>)>,
pub fds: Vec<(Fd, VmId)>,
pub inherited_fd: Vec<(VmId, Vec<Fd>)>,
pub terminated_vms: Vec<(VmId, i8)>,
pub instantiated_ids: Vec<VmId>,
}
Expand description
Full state representing all VM instances from verifying a CKB script. It should be serializable to binary formats, while also be able to fully recover the running environment with the full transaction environment.
Fields§
§total_cycles: Cycle
Total executed cycles
iteration_cycles: Cycle
Iteration cycles. Due to an implementation bug in Meepo hardfork, this value will not always be zero at visible execution boundaries. We will have to preserve this value.
next_vm_id: VmId
Next available VM ID
next_fd_slot: u64
Next available file descriptor
vms: Vec<(VmId, VmState, Snapshot2<DataPieceId>)>
Suspended VMs
fds: Vec<(Fd, VmId)>
Opened file descriptors with owners
inherited_fd: Vec<(VmId, Vec<Fd>)>
Inherited file descriptors for each spawned process
terminated_vms: Vec<(VmId, i8)>
Terminated VMs with exit codes
instantiated_ids: Vec<VmId>
Currently instantiated VMs. Upon resumption, those VMs will be instantiated.
Implementations§
Trait Implementations§
Source§impl Clone for FullSuspendedState
impl Clone for FullSuspendedState
Source§fn clone(&self) -> FullSuspendedState
fn clone(&self) -> FullSuspendedState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for FullSuspendedState
impl RefUnwindSafe for FullSuspendedState
impl Send for FullSuspendedState
impl Sync for FullSuspendedState
impl Unpin for FullSuspendedState
impl UnwindSafe for FullSuspendedState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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