pub enum KernelMode {
Normal,
Record,
Replay,
Verify,
}Expand description
Runtime mode for the kernel: determines whether nondeterministic operations are allowed.
Variants§
Normal
Normal execution: no restrictions.
Record
Recording a run for later replay; event stream is the source of truth.
Replay
Replaying from the event log; no live side effects, traps on clock/random/spawn.
Verify
Verifying: same as Replay but also check event stream hash matches expected.
Implementations§
Source§impl KernelMode
impl KernelMode
Sourcepub fn traps_nondeterminism(self) -> bool
pub fn traps_nondeterminism(self) -> bool
Returns true if clock access, hardware randomness, and thread spawn must be trapped.
Trait Implementations§
Source§impl Clone for KernelMode
impl Clone for KernelMode
Source§fn clone(&self) -> KernelMode
fn clone(&self) -> KernelMode
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 moreSource§impl Debug for KernelMode
impl Debug for KernelMode
Source§impl Default for KernelMode
impl Default for KernelMode
Source§impl<'de> Deserialize<'de> for KernelMode
impl<'de> Deserialize<'de> for KernelMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for KernelMode
impl PartialEq for KernelMode
Source§impl Serialize for KernelMode
impl Serialize for KernelMode
impl Copy for KernelMode
impl Eq for KernelMode
impl StructuralPartialEq for KernelMode
Auto Trait Implementations§
impl Freeze for KernelMode
impl RefUnwindSafe for KernelMode
impl Send for KernelMode
impl Sync for KernelMode
impl Unpin for KernelMode
impl UnsafeUnpin for KernelMode
impl UnwindSafe for KernelMode
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