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§
impl<M: Eq + Clone, V: Eq + Clone> Eq for MemoryLayout<M, V>
impl<M: Clone, V: Clone> StructuralPartialEq for MemoryLayout<M, V>
Auto Trait Implementations§
impl<M, V> Freeze for MemoryLayout<M, V>
impl<M, V> RefUnwindSafe for MemoryLayout<M, V>where
M: RefUnwindSafe,
V: RefUnwindSafe,
impl<M, V> Send for MemoryLayout<M, V>
impl<M, V> Sync for MemoryLayout<M, V>
impl<M, V> Unpin for MemoryLayout<M, V>
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