pub struct AdjacencyList {
pub width: usize,
pub height: usize,
pub neighbors: Vec<Vec<GridCoord2D>>,
}Fields§
§width: usize§height: usize§neighbors: Vec<Vec<GridCoord2D>>Implementations§
Source§impl AdjacencyList
impl AdjacencyList
pub fn neighbors(&self, coord: GridCoord2D) -> &[GridCoord2D]
pub fn get_neighbors(&self, coord: GridCoord2D) -> Option<&[GridCoord2D]>
Trait Implementations§
Source§impl Clone for AdjacencyList
impl Clone for AdjacencyList
Source§fn clone(&self) -> AdjacencyList
fn clone(&self) -> AdjacencyList
Returns a duplicate of the value. Read more
1.0.0 · 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 AdjacencyList
impl Debug for AdjacencyList
Source§impl From<&Wall4Grid> for AdjacencyList
impl From<&Wall4Grid> for AdjacencyList
Source§impl Index<GridCoord2D> for AdjacencyList
impl Index<GridCoord2D> for AdjacencyList
Source§type Output = [GridCoord2D]
type Output = [GridCoord2D]
The returned type after indexing.
Source§impl PartialEq for AdjacencyList
impl PartialEq for AdjacencyList
impl Eq for AdjacencyList
impl StructuralPartialEq for AdjacencyList
Auto Trait Implementations§
impl Freeze for AdjacencyList
impl RefUnwindSafe for AdjacencyList
impl Send for AdjacencyList
impl Sync for AdjacencyList
impl Unpin for AdjacencyList
impl UnsafeUnpin for AdjacencyList
impl UnwindSafe for AdjacencyList
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