pub struct GraphBuilder { /* private fields */ }Expand description
Builder for constructing a Graph programmatically. The style
parser will drive this from JSON later; tests use it directly.
Implementations§
Source§impl GraphBuilder
impl GraphBuilder
pub fn new() -> Self
pub fn add_node( &mut self, id: impl Into<NodeId>, node: Box<dyn Node>, ) -> &mut Self
pub fn connect( &mut self, src: impl Into<NodeId>, dst: impl Into<NodeId>, dst_port: impl Into<String>, ) -> &mut Self
pub fn set_output(&mut self, id: impl Into<NodeId>) -> &mut Self
pub fn build(self) -> Result<Graph, BuildError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphBuilder
impl !RefUnwindSafe for GraphBuilder
impl Send for GraphBuilder
impl Sync for GraphBuilder
impl Unpin for GraphBuilder
impl UnsafeUnpin for GraphBuilder
impl !UnwindSafe for GraphBuilder
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