pub struct GraphBuilder<Id: Hash + Eq + Copy, N: Node> { /* private fields */ }
Expand description
Builds a CompiledGraph from the specified nodes and connections
This basically means a topological sort so that nodes are executed after their dependencies
Implementations§
Source§impl<Id: Hash + Eq + Copy, N: Node> GraphBuilder<Id, N>
impl<Id: Hash + Eq + Copy, N: Node> GraphBuilder<Id, N>
pub fn new_with_config(config: N::Config) -> Self
pub fn add_node( &mut self, id: Id, node: impl Into<N>, ) -> Result<(), DuplicateId>
pub fn add_connection(&mut self, connection: Connection<Id>)
pub fn build(self) -> Result<CompiledGraph<Id, N>, BuildError<Id>>
Auto Trait Implementations§
impl<Id, N> Freeze for GraphBuilder<Id, N>
impl<Id, N> RefUnwindSafe for GraphBuilder<Id, N>where
<N as Node>::Config: RefUnwindSafe,
Id: RefUnwindSafe,
N: RefUnwindSafe,
<N as Node>::Data: RefUnwindSafe,
impl<Id, N> Send for GraphBuilder<Id, N>
impl<Id, N> Sync for GraphBuilder<Id, N>
impl<Id, N> Unpin for GraphBuilder<Id, N>
impl<Id, N> UnwindSafe for GraphBuilder<Id, N>where
<N as Node>::Config: UnwindSafe,
Id: UnwindSafe,
N: UnwindSafe,
<N as Node>::Data: 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