pub struct DagBuilder<K, O, E>{ /* private fields */ }Expand description
Builder for constructing a DAG keyed by K.
Add sources and tasks, then call build() to get a Dag.
Implementations§
Source§impl<K, O, E> DagBuilder<K, O, E>
impl<K, O, E> DagBuilder<K, O, E>
pub fn new() -> Self
pub fn add_source(&mut self, key: K, value: O) -> Result<(), BuildError<K>>
pub fn add_task<F>( &mut self, key: K, deps: Vec<K>, f: F, ) -> Result<(), BuildError<K>>
pub fn build(self) -> Result<Dag<K, O, E>, BuildError<K>>
Trait Implementations§
Auto Trait Implementations§
impl<K, O, E> Freeze for DagBuilder<K, O, E>
impl<K, O, E> !RefUnwindSafe for DagBuilder<K, O, E>
impl<K, O, E> Send for DagBuilder<K, O, E>
impl<K, O, E> Sync for DagBuilder<K, O, E>
impl<K, O, E> Unpin for DagBuilder<K, O, E>where
K: Unpin,
impl<K, O, E> UnsafeUnpin for DagBuilder<K, O, E>
impl<K, O, E> !UnwindSafe for DagBuilder<K, O, E>
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