pub struct NoteAddressIndex { /* private fields */ }Expand description
Maps address ranges to note IDs within one address space.
Implementations§
Source§impl NoteAddressIndex
impl NoteAddressIndex
pub fn insert(&mut self, range: AddressRange, id: NoteId)
pub fn remove(&mut self, id: &NoteId) -> Option<AddressRange>
pub fn range(&self, id: &NoteId) -> Option<AddressRange>
pub fn overlapping<'a>( &'a self, range: AddressRange, notes: &'a Notes, ) -> Vec<&'a Note>
pub fn inside<'a>( &'a self, range: AddressRange, notes: &'a Notes, ) -> Vec<&'a Note>
Sourcepub fn near<'a>(
&'a self,
addr: AddressValue,
window: AddressValue,
notes: &'a Notes,
) -> Vec<ProximateNote<'a>>
pub fn near<'a>( &'a self, addr: AddressValue, window: AddressValue, notes: &'a Notes, ) -> Vec<ProximateNote<'a>>
Notes within window bytes of addr, paired with their distance
(0 = the address falls inside the note’s range), nearest first.
Trait Implementations§
Source§impl Clone for NoteAddressIndex
impl Clone for NoteAddressIndex
Source§impl Debug for NoteAddressIndex
impl Debug for NoteAddressIndex
Source§impl Default for NoteAddressIndex
impl Default for NoteAddressIndex
impl Eq for NoteAddressIndex
Source§impl PartialEq for NoteAddressIndex
impl PartialEq for NoteAddressIndex
impl StructuralPartialEq for NoteAddressIndex
Auto Trait Implementations§
impl Forget for NoteAddressIndex
impl Freeze for NoteAddressIndex
impl Move for NoteAddressIndex
impl RefUnwindSafe for NoteAddressIndex
impl Send for NoteAddressIndex
impl Sync for NoteAddressIndex
impl Unpin for NoteAddressIndex
impl UnsafeUnpin for NoteAddressIndex
impl UnwindSafe for NoteAddressIndex
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