[−][src]Struct solvent::DepGraph
This is the dependency graph. The type T
is intended to be a small type, or a
reference to a larger type that implements Eq
(you will need to supply the type
and vectors of the type to functions).
Implementations
impl<T: Eq> DepGraph<T>
[src]
pub fn new() -> DepGraph<T>
[src]
Create an empty DepGraph.
pub fn register_nodes(&mut self, nodes: Vec<T>)
[src]
Register nodes in the graph. The nodes
are added to any existing nodes,
after checking to avoid duplicates.
pub fn register_node(&mut self, node: T)
[src]
Register a node in the graph. The node
is added to any existing nodes,
after checking to avoid duplicates.
pub fn register_dependency(&mut self, node: T, depends_on: T)
[src]
Add a dependency to a DepGraph. The node does not need to pre-exist, nor does the dependency node. If the node does pre-exist, the depends_on will be added to its existing dependency list. Otherwise it will be created.
pub fn register_dependencies(&mut self, node: T, depends_on: Vec<T>)
[src]
Add multiple dependencies of one node to a DepGraph. The node does not need to pre-exist, nor does the dependency node. If the node does pre-exist, the depends_on will be added to its existing dependency list. Otherwise it will be created.
pub fn mark_as_satisfied(&mut self, nodes: &[T]) -> Result<(), SolventError>
[src]
This marks a node as satisfied. Iterators will not output such nodes. Nodes must exist.
pub fn dependencies_of<'a>(
&'a self,
target: &T
) -> Result<DepGraphIterator<'a, T>, SolventError>
[src]
&'a self,
target: &T
) -> Result<DepGraphIterator<'a, T>, SolventError>
Get an iterator to iterate through the dependencies of the target node. Target node must exist.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for DepGraph<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for DepGraph<T> where
T: Send,
T: Send,
impl<T> Sync for DepGraph<T> where
T: Sync,
T: Sync,
impl<T> Unpin for DepGraph<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for DepGraph<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,