pub struct OccupiedEntry<'a, N, NI, EI, NM>where
NI: Copy + Eq + Debug + 'static,
EI: Copy + Eq + Debug + 'static,
NM: MapWithEntry<Node<N, EI>, Key = NI> + 'a,{ /* private fields */ }Expand description
An occupied node entry.
Implementations§
Source§impl<'a, N, NI, EI, NM> OccupiedEntry<'a, N, NI, EI, NM>
impl<'a, N, NI, EI, NM> OccupiedEntry<'a, N, NI, EI, NM>
Sourcepub fn into_mut(self) -> &'a mut N
pub fn into_mut(self) -> &'a mut N
Converts the OccupiedEntry` into a mutable reference to the value in the entry with a
lifetime bound to the map itself.
Sourcepub fn remove(self) -> Result<N, RemoveNodeError>
pub fn remove(self) -> Result<N, RemoveNodeError>
Removes a node the entry points to from the graph.
§Errors
Returns a RemoveNodeError in case the node is still connected when being removed.
Trait Implementations§
Source§impl<'a, N: Debug, NI, EI, NM> Debug for OccupiedEntry<'a, N, NI, EI, NM>
impl<'a, N: Debug, NI, EI, NM> Debug for OccupiedEntry<'a, N, NI, EI, NM>
Auto Trait Implementations§
impl<'a, N, NI, EI, NM> Freeze for OccupiedEntry<'a, N, NI, EI, NM>
impl<'a, N, NI, EI, NM> RefUnwindSafe for OccupiedEntry<'a, N, NI, EI, NM>
impl<'a, N, NI, EI, NM> Send for OccupiedEntry<'a, N, NI, EI, NM>
impl<'a, N, NI, EI, NM> Sync for OccupiedEntry<'a, N, NI, EI, NM>
impl<'a, N, NI, EI, NM> Unpin for OccupiedEntry<'a, N, NI, EI, NM>
impl<'a, N, NI, EI, NM> UnwindSafe for OccupiedEntry<'a, N, NI, EI, NM>
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
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