pub struct StationIndexSet { /* private fields */ }Expand description
Station-local spatial indexes keyed by station id.
Implementations§
Source§impl StationIndexSet
impl StationIndexSet
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates an empty collection with capacity for capacity Station indexes.
Sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Reserves capacity for at least additional more indexes and lookup entries.
Sourcepub fn insert(&mut self, station_id: StationId, index: CellIndex)
pub fn insert(&mut self, station_id: StationId, index: CellIndex)
Adds or replaces one station index.
Sourcepub fn remove(&mut self, station_id: StationId) -> Option<CellIndex>
pub fn remove(&mut self, station_id: StationId) -> Option<CellIndex>
Removes and returns one Station-local spatial index.
Remaining indexes retain their iteration order and indexed lookup storage remains allocated for later registrations.
Sourcepub fn get_mut(&mut self, station_id: StationId) -> Option<&mut CellIndex>
pub fn get_mut(&mut self, station_id: StationId) -> Option<&mut CellIndex>
Gets one mutable station index.
Sourcepub fn get_pair_mut(
&mut self,
left_id: StationId,
right_id: StationId,
) -> Option<(&mut CellIndex, &mut CellIndex)>
pub fn get_pair_mut( &mut self, left_id: StationId, right_id: StationId, ) -> Option<(&mut CellIndex, &mut CellIndex)>
Gets two distinct mutable station indexes.
Sourcepub fn index_capacity(&self) -> usize
pub fn index_capacity(&self) -> usize
Index slots retained without growing the ordered collection.
Sourcepub fn lookup_capacity(&self) -> usize
pub fn lookup_capacity(&self) -> usize
Lookup entries retained without rehashing the Station index.
Sourcepub fn lookup_index_active(&self) -> bool
pub fn lookup_index_active(&self) -> bool
Returns whether Station-index lookup currently uses the indexed path.
Trait Implementations§
Source§impl Clone for StationIndexSet
impl Clone for StationIndexSet
Source§fn clone(&self) -> StationIndexSet
fn clone(&self) -> StationIndexSet
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 StationIndexSet
impl Debug for StationIndexSet
Source§impl Default for StationIndexSet
impl Default for StationIndexSet
Source§fn default() -> StationIndexSet
fn default() -> StationIndexSet
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StationIndexSet
impl RefUnwindSafe for StationIndexSet
impl Send for StationIndexSet
impl Sync for StationIndexSet
impl Unpin for StationIndexSet
impl UnsafeUnpin for StationIndexSet
impl UnwindSafe for StationIndexSet
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