Enum workspace_node_tools::dependency::Step
source · pub enum Step<'a, N: Node> {
Resolved(&'a N),
Unresolved(&'a N::DependencyType),
}Expand description
Wrapper around dependency graph nodes. Since a graph might have dependencies that cannot be resolved internally, this wrapper is necessary to differentiate between internally resolved and externally (unresolved) dependencies. An Unresolved dependency does not necessarily mean that it cannot be resolved, only that no Node within the graph fulfills it.
Variants§
Resolved(&'a N)
Unresolved(&'a N::DependencyType)
Implementations§
source§impl<'a, N: Node> Step<'a, N>
impl<'a, N: Node> Step<'a, N>
pub fn is_resolved(&self) -> bool
pub fn as_resolved(&self) -> Option<&N>
pub fn as_unresolved(&self) -> Option<&N::DependencyType>
Auto Trait Implementations§
impl<'a, N> Freeze for Step<'a, N>
impl<'a, N> RefUnwindSafe for Step<'a, N>
impl<'a, N> Send for Step<'a, N>
impl<'a, N> Sync for Step<'a, N>
impl<'a, N> Unpin for Step<'a, N>
impl<'a, N> UnwindSafe for Step<'a, N>
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