Struct MemoryRanges
pub struct MemoryRanges<'a> { /* private fields */ }Expand description
Access to ranges of a Memory, from
Memory::data_ranges_and_store_data_mut.
Ranges are read with MemoryRanges::data_range (or all of memory with
MemoryRanges::data) and modified with
MemoryRanges::data_range_mut, which considers only the range it
returns modified.
Implementations§
§impl<'a> MemoryRanges<'a>
impl<'a> MemoryRanges<'a>
pub fn data_range(
&self,
range: Range<usize>,
) -> Result<&[u8], MemoryAccessError>
pub fn data_range( &self, range: Range<usize>, ) -> Result<&[u8], MemoryAccessError>
range of the memory, for reading, or an error if it is out of
bounds.
pub fn data_range_mut(
&mut self,
range: Range<usize>,
) -> Result<&mut [u8], MemoryAccessError>
pub fn data_range_mut( &mut self, range: Range<usize>, ) -> Result<&mut [u8], MemoryAccessError>
range of the memory, for modification, or an error if it is out of
bounds. Only this range is considered modified.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for MemoryRanges<'a>
impl<'a> !UnwindSafe for MemoryRanges<'a>
impl<'a> Freeze for MemoryRanges<'a>
impl<'a> Send for MemoryRanges<'a>
impl<'a> Sync for MemoryRanges<'a>
impl<'a> Unpin for MemoryRanges<'a>
impl<'a> UnsafeUnpin for MemoryRanges<'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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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