struct NodeSlot<N> {
weight: Option<N>,
generation: u32,
dependents: Vec<u32>,
dependencies: Vec<u32>,
}Expand description
A slot a node occupies.
Fields§
§weight: Option<N>The node’s weight, or None while the slot is vacant.
generation: u32The generation this slot is in. Bumped whenever a node is removed and the slot is handed out again, so handles from the previous occupant stop resolving.
dependents: Vec<u32>Edges leaving this node, towards the nodes that depend on it.
dependencies: Vec<u32>Edges entering this node, from the nodes it depends on.
Trait Implementations§
Auto Trait Implementations§
impl<N> Forget for NodeSlot<N>
impl<N> Freeze for NodeSlot<N>
impl<N> RefUnwindSafe for NodeSlot<N>where
Option<N>: RefUnwindSafe,
impl<N> Send for NodeSlot<N>
impl<N> Sync for NodeSlot<N>
impl<N> Unpin for NodeSlot<N>
impl<N> UnsafeUnpin for NodeSlot<N>where
Option<N>: UnsafeUnpin,
impl<N> UnwindSafe for NodeSlot<N>where
Option<N>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more