pub struct AdjacencyRow { /* private fields */ }Expand description
A single row in the upstream adjacency graph.
Represents one drainage unit and the set of same-level units directly upstream of it.
Implementations§
Source§impl AdjacencyRow
impl AdjacencyRow
Sourcepub fn new(id: UnitId, level: Level, upstream_ids: Vec<UnitId>) -> Self
pub fn new(id: UnitId, level: Level, upstream_ids: Vec<UnitId>) -> Self
Construct an AdjacencyRow from a unit ID, level, and upstream neighbours.
Sourcepub fn upstream_ids(&self) -> &[UnitId]
pub fn upstream_ids(&self) -> &[UnitId]
Return the slice of upstream unit IDs.
Sourcepub fn is_headwater(&self) -> bool
pub fn is_headwater(&self) -> bool
Return true if this unit has no upstream neighbours.
Trait Implementations§
Source§impl Clone for AdjacencyRow
impl Clone for AdjacencyRow
Source§fn clone(&self) -> AdjacencyRow
fn clone(&self) -> AdjacencyRow
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 AdjacencyRow
impl Debug for AdjacencyRow
Source§impl PartialEq for AdjacencyRow
impl PartialEq for AdjacencyRow
Source§fn eq(&self, other: &AdjacencyRow) -> bool
fn eq(&self, other: &AdjacencyRow) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AdjacencyRow
Auto Trait Implementations§
impl Freeze for AdjacencyRow
impl RefUnwindSafe for AdjacencyRow
impl Send for AdjacencyRow
impl Sync for AdjacencyRow
impl Unpin for AdjacencyRow
impl UnsafeUnpin for AdjacencyRow
impl UnwindSafe for AdjacencyRow
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