pub struct AdjacencyRow { /* private fields */ }Expand description
A single row in the upstream adjacency graph.
Represents one catchment atom and the set of atoms directly upstream of it.
Implementations§
Source§impl AdjacencyRow
impl AdjacencyRow
Sourcepub fn new(id: AtomId, upstream_ids: Vec<AtomId>) -> Self
pub fn new(id: AtomId, upstream_ids: Vec<AtomId>) -> Self
Construct an AdjacencyRow from an atom ID and its upstream neighbours.
Sourcepub fn upstream_ids(&self) -> &[AtomId]
pub fn upstream_ids(&self) -> &[AtomId]
Return the slice of upstream atom IDs.
Sourcepub fn is_headwater(&self) -> bool
pub fn is_headwater(&self) -> bool
Return true if this atom has no upstream neighbours (i.e. it is a headwater).
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 · 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
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