[−][src]Struct falcon::memory::backing::Memory
A simple memory model, containing permissioned sections of type u8
.
Methods
impl Memory
[src]
pub fn new(endian: Endian) -> Memory
[src]
Create a new backed memory module with the given endianness.
pub fn sections(&self) -> &BTreeMap<u64, Section>
[src]
Get the sections in this memory module.
pub fn permissions(&self, address: u64) -> Option<MemoryPermissions>
[src]
Get the permissions at the given address.
pub fn get8(&self, address: u64) -> Option<u8>
[src]
Get the u8
value at the given address.
pub fn set32(&mut self, address: u64, value: u32) -> Result<()>
[src]
Set the 32-bit value at the given address, allowing the memory model to account for the underlying endianness.
pub fn get32(&self, address: u64) -> Option<u32>
[src]
Get the 32-bit value at the given address, allowing the memory model to account for the underlying endianness.
pub fn get(&self, address: u64, bits: usize) -> Option<Constant>
[src]
Get a constant value up to a certain number of bits
pub fn set_memory(
&mut self,
address: u64,
data: Vec<u8>,
permissions: MemoryPermissions
)
[src]
&mut self,
address: u64,
data: Vec<u8>,
permissions: MemoryPermissions
)
Set the memory at the given address, and give that memory the given permissions.
This takes care of the underlying memory sections automatically.
Trait Implementations
impl Clone for Memory
[src]
impl Debug for Memory
[src]
impl<'de> Deserialize<'de> for Memory
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Memory
[src]
impl PartialEq<Memory> for Memory
[src]
impl Serialize for Memory
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Memory
[src]
impl StructuralPartialEq for Memory
[src]
impl TranslationMemory for Memory
[src]
Auto Trait Implementations
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,