Struct svmap::MemoryLayout
source · pub struct MemoryLayout<M: Clone, V: Clone> { /* private fields */ }
Expand description
Contains the result of compiled SVMap.
Implementations§
source§impl<M: Clone, V: Clone> MemoryLayout<M, V>
impl<M: Clone, V: Clone> MemoryLayout<M, V>
sourcepub fn from_file(
path: &str,
region_interpreter: fn(_: &str) -> Result<M, &str>,
vector_interpreter: fn(_: &str) -> Result<V, &str>
) -> Result<Self, Error>
pub fn from_file( path: &str, region_interpreter: fn(_: &str) -> Result<M, &str>, vector_interpreter: fn(_: &str) -> Result<V, &str> ) -> Result<Self, Error>
Returns a MemoryLayout
struct from a given filepath.
The region_interpreter
and the vector_interpreter
convert a &str
to the corresponding
(user defined) description.
sourcepub fn from_lines(
lines: String,
region_interpreter: fn(_: &str) -> Result<M, &str>,
vector_interpreter: fn(_: &str) -> Result<V, &str>
) -> Result<Self, Error>
pub fn from_lines( lines: String, region_interpreter: fn(_: &str) -> Result<M, &str>, vector_interpreter: fn(_: &str) -> Result<V, &str> ) -> Result<Self, Error>
Returns a MemoryLayout
struct from a given String
.
The region_interpreter
and the vector_interpreter
convert a &str
to the corresponding
(user defined) description.
sourcepub fn get_unassigned_regions(&self, description: M) -> Vec<MemoryRegion<M>>
pub fn get_unassigned_regions(&self, description: M) -> Vec<MemoryRegion<M>>
Returns all the unassigned memory regions between 0
and the last MemoryRegion
s lower
bound with the user defined description.
sourcepub fn address_is_assigned(&self, address: AddressType) -> bool
pub fn address_is_assigned(&self, address: AddressType) -> bool
Returns true
if a address is inside of a MemoryRegion
(and thus is assigned).
Trait Implementations§
source§impl<M: PartialEq + Clone, V: PartialEq + Clone> PartialEq<MemoryLayout<M, V>> for MemoryLayout<M, V>
impl<M: PartialEq + Clone, V: PartialEq + Clone> PartialEq<MemoryLayout<M, V>> for MemoryLayout<M, V>
source§fn eq(&self, other: &MemoryLayout<M, V>) -> bool
fn eq(&self, other: &MemoryLayout<M, V>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<M: Eq + Clone, V: Eq + Clone> Eq for MemoryLayout<M, V>
impl<M: Clone, V: Clone> StructuralEq for MemoryLayout<M, V>
impl<M: Clone, V: Clone> StructuralPartialEq for MemoryLayout<M, V>
Auto Trait Implementations§
impl<M, V> RefUnwindSafe for MemoryLayout<M, V>where M: RefUnwindSafe, V: RefUnwindSafe,
impl<M, V> Send for MemoryLayout<M, V>where M: Send, V: Send,
impl<M, V> Sync for MemoryLayout<M, V>where M: Sync, V: Sync,
impl<M, V> Unpin for MemoryLayout<M, V>where M: Unpin, V: Unpin,
impl<M, V> UnwindSafe for MemoryLayout<M, V>where M: UnwindSafe, V: UnwindSafe,
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