Struct MemoryAccesses
pub struct MemoryAccesses<A: Arch> {
pub instr: Instruction,
pub memory: Vec<MemoryAccess<A>>,
pub use_trap_flag: bool,
}
Expand description
A collection of memory accesses.
Fields§
§instr: Instruction
The instruction for which these memory accesses are relevant.
memory: Vec<MemoryAccess<A>>
The set of memory accesses performed by instr
.
use_trap_flag: bool
Whether the trap flag should be used to observe instr
.
Memory access analysis will detect when an instruction can jump, and if so, set this field to true.
Implementations§
§impl<A: Arch> MemoryAccesses<A>
impl<A: Arch> MemoryAccesses<A>
pub fn max_size_of(&self, location: &Location<A>) -> usize
pub fn max_size_of(&self, location: &Location<A>) -> usize
Returns the largest number of bytes that can be in the provided storage location.
pub fn slice(&self, length: usize) -> MemoryAccesses<A>
pub fn slice(&self, length: usize) -> MemoryAccesses<A>
Slices the memory accesses to only include the first length
accesses.
pub fn iter(&self) -> impl Iterator<Item = &MemoryAccess<A>>
pub fn iter(&self) -> impl Iterator<Item = &MemoryAccess<A>>
Iterates over all accesses.
pub fn map_computations(
&self,
f: impl FnMut(usize, &Inputs<A>, &AddressComputation) -> (Inputs<A>, AddressComputation),
) -> MemoryAccesses<A>
pub fn map_computations( &self, f: impl FnMut(usize, &Inputs<A>, &AddressComputation) -> (Inputs<A>, AddressComputation), ) -> MemoryAccesses<A>
Maps all address computations and inputs to new values.
§impl<A: Arch> MemoryAccesses<A>
impl<A: Arch> MemoryAccesses<A>
pub fn map(
&self,
instr: Instruction,
f: impl Fn(FlowValueLocation, &Source<A>) -> Option<Source<A>>,
map_address_computations: impl Fn(usize, &AddressComputation) -> Option<AddressComputation>,
) -> MemoryAccesses<A>
pub fn map( &self, instr: Instruction, f: impl Fn(FlowValueLocation, &Source<A>) -> Option<Source<A>>, map_address_computations: impl Fn(usize, &AddressComputation) -> Option<AddressComputation>, ) -> MemoryAccesses<A>
Individually maps all computations and all inputs of all memory accesses to new values.
Trait Implementations§
§impl<A: Clone + Arch> Clone for MemoryAccesses<A>
impl<A: Clone + Arch> Clone for MemoryAccesses<A>
§fn clone(&self) -> MemoryAccesses<A>
fn clone(&self) -> MemoryAccesses<A>
Returns a copy 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 more§impl<A: Debug + Arch> Debug for MemoryAccesses<A>
impl<A: Debug + Arch> Debug for MemoryAccesses<A>
§impl<'de, A: Arch> Deserialize<'de> for MemoryAccesses<A>
impl<'de, A: Arch> Deserialize<'de> for MemoryAccesses<A>
§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<A: Arch> Display for MemoryAccesses<A>
impl<A: Arch> Display for MemoryAccesses<A>
§impl<A: Hash + Arch> Hash for MemoryAccesses<A>
impl<A: Hash + Arch> Hash for MemoryAccesses<A>
§impl<A: Arch> Index<usize> for MemoryAccesses<A>
impl<A: Arch> Index<usize> for MemoryAccesses<A>
§type Output = MemoryAccess<A>
type Output = MemoryAccess<A>
The returned type after indexing.
§fn index(&self, index: usize) -> &MemoryAccess<A>
fn index(&self, index: usize) -> &MemoryAccess<A>
Performs the indexing (
container[index]
) operation. Read more§impl<A: Arch> IndexMut<usize> for MemoryAccesses<A>
impl<A: Arch> IndexMut<usize> for MemoryAccesses<A>
§fn index_mut(&mut self, index: usize) -> &mut MemoryAccess<A>
fn index_mut(&mut self, index: usize) -> &mut MemoryAccess<A>
Performs the mutable indexing (
container[index]
) operation. Read more§impl<A> JsonSchema for MemoryAccesses<A>
impl<A> JsonSchema for MemoryAccesses<A>
§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<A: PartialEq + Arch> PartialEq for MemoryAccesses<A>
impl<A: PartialEq + Arch> PartialEq for MemoryAccesses<A>
§impl<A: Arch> Serialize for MemoryAccesses<A>
impl<A: Arch> Serialize for MemoryAccesses<A>
impl<A: Eq + Arch> Eq for MemoryAccesses<A>
impl<A: Arch> StructuralPartialEq for MemoryAccesses<A>
Auto Trait Implementations§
impl<A> Freeze for MemoryAccesses<A>
impl<A> RefUnwindSafe for MemoryAccesses<A>
impl<A> Send for MemoryAccesses<A>
impl<A> Sync for MemoryAccesses<A>
impl<A> Unpin for MemoryAccesses<A>
impl<A> UnwindSafe for MemoryAccesses<A>
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