Struct FakeState
pub struct FakeState { /* private fields */ }
Expand description
The CPU state for FakeArch
.
Trait Implementations§
§impl CpuState<FakeArch> for FakeState
impl CpuState<FakeArch> for FakeState
§type DiffMask = ()
type DiffMask = ()
The type of the difference mask used in
CpuState::find_dataflows_masked
. Read more§fn state_byte_to_reg(byte: StateByte) -> (<FakeArch as Arch>::Reg, usize)
fn state_byte_to_reg(byte: StateByte) -> (<FakeArch as Arch>::Reg, usize)
Converts a state byte to a register.
Inverse of
CpuState::reg_to_state_byte
.§fn reg_to_state_byte(reg: <FakeArch as Arch>::Reg, byte: usize) -> StateByte
fn reg_to_state_byte(reg: <FakeArch as Arch>::Reg, byte: usize) -> StateByte
Converts a (register, byte index) tuple to a state byte.
Inverse of
CpuState::state_byte_to_reg
.§fn find_differences<F: FnMut(StateByte)>(&self, other: &Self, found: &mut F)
fn find_differences<F: FnMut(StateByte)>(&self, other: &Self, found: &mut F)
Enumerates over all differences between the two state pairs.
Calls
found
for each state byte that differs between self
and other
.
The call order is unspecified.§fn create_diff_mask<I: Iterator<Item = StateByte>>(_items: I) -> Self::DiffMask
fn create_diff_mask<I: Iterator<Item = StateByte>>(_items: I) -> Self::DiffMask
Creates a mask of state bytes whose differences can be ignored.
§fn create<R: FnMut(A::Reg, MutValue<'_>)>(regval: R) -> Self
fn create<R: FnMut(A::Reg, MutValue<'_>)>(regval: R) -> Self
Creates a new CPU state using
regval
to determine the values of the registers. Read more§fn default_with_pc(pc: u64) -> Self
fn default_with_pc(pc: u64) -> Self
Creates a default state with the program counter set to
pc
.§fn get_state_byte(&self, byte: StateByte) -> u8
fn get_state_byte(&self, byte: StateByte) -> u8
Returns the value of the byte
byte
in the CPU state.§fn set_state_byte(&mut self, byte: StateByte, value: u8)
fn set_state_byte(&mut self, byte: StateByte, value: u8)
Sets the value of the byte
byte
in the CPU state.§fn state_bytes_unequal(&self, dest: StateByte, other: &Self) -> bool
fn state_bytes_unequal(&self, dest: StateByte, other: &Self) -> bool
Returns true if the value of the specified state byte in
self
is not equal to the value in other
.§fn state_bytes_equal(&self, dest: StateByte, other: &Self) -> bool
fn state_bytes_equal(&self, dest: StateByte, other: &Self) -> bool
Returns true if the value of the specified state byte in
self
is equal to the value in other
.§fn find_dataflows_masked<F: FnMut(StateByte)>(
b: SystemStateIoPair<'_, A>,
a: SystemStateIoPair<'_, A>,
dest_diff_mask: &Self::DiffMask,
diff_mask: &Self::DiffMask,
found: &mut F,
)
fn find_dataflows_masked<F: FnMut(StateByte)>( b: SystemStateIoPair<'_, A>, a: SystemStateIoPair<'_, A>, dest_diff_mask: &Self::DiffMask, diff_mask: &Self::DiffMask, found: &mut F, )
Enumerates over all differences between the two state pairs.
Calls
found
for each state byte that differs between self
and other
.
diff_mask
is a hint of differences that can be ignored.
Therefore, this function may call found
even for state bytes that can be ignored according to diff_mask
.§impl<'de> Deserialize<'de> for FakeState
impl<'de> Deserialize<'de> for FakeState
§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
§impl JsonSchema for FakeState
impl JsonSchema for FakeState
§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read more§impl Ord for FakeState
impl Ord for FakeState
§impl PartialOrd for FakeState
impl PartialOrd for FakeState
impl Copy for FakeState
impl Eq for FakeState
impl StructuralPartialEq for FakeState
Auto Trait Implementations§
impl Freeze for FakeState
impl RefUnwindSafe for FakeState
impl Send for FakeState
impl Sync for FakeState
impl Unpin for FakeState
impl UnwindSafe for FakeState
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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