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>
Trait Implementations§
Source§impl Clone for NoteAddressIndex
impl Clone for NoteAddressIndex
Source§fn clone(&self) -> NoteAddressIndex
fn clone(&self) -> NoteAddressIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NoteAddressIndex
impl Debug for NoteAddressIndex
Source§impl Default for NoteAddressIndex
impl Default for NoteAddressIndex
Source§fn default() -> NoteAddressIndex
fn default() -> NoteAddressIndex
Returns the “default value” for a type. Read more
impl Eq for NoteAddressIndex
Source§impl PartialEq for NoteAddressIndex
impl PartialEq for NoteAddressIndex
Source§fn eq(&self, other: &NoteAddressIndex) -> bool
fn eq(&self, other: &NoteAddressIndex) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NoteAddressIndex
Auto Trait Implementations§
impl Freeze 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