pub trait MemoryRange {
    // Required methods
    fn contains_range(&self, range: &Range<u64>) -> bool;
    fn intersects_range(&self, range: &Range<u64>) -> bool;
    fn align_to_32_bits(&mut self);
}
Expand description

Enables the user to do range intersection testing.

Required Methods§

source

fn contains_range(&self, range: &Range<u64>) -> bool

Returns true if self contains range fully.

source

fn intersects_range(&self, range: &Range<u64>) -> bool

Returns true if self intersects range partially.

source

fn align_to_32_bits(&mut self)

Ensure memory reads using this memory range, will be aligned to 32 bits. This may result in slightly more memory being read than requested.

Implementations on Foreign Types§

source§

impl MemoryRange for Range<u64>

source§

fn contains_range(&self, range: &Range<u64>) -> bool

source§

fn intersects_range(&self, range: &Range<u64>) -> bool

source§

fn align_to_32_bits(&mut self)

Implementors§