pub struct GraphCtx<'r> { /* private fields */ }Expand description
Graph definition context for graph-backed nodes.
Implementations§
Source§impl<'r> GraphCtx<'r>
impl<'r> GraphCtx<'r>
pub fn new(registry: &'r Registry, inputs: &[&str], outputs: &[&str]) -> Self
pub fn node(&mut self, id: &str) -> NodeHandle
pub fn node_as(&mut self, id: &str, alias: &str) -> NodeHandle
pub fn connect(&mut self, from: &PortHandle, to: &PortHandle)
pub fn const_input(&mut self, port: &PortHandle, value: Value)
pub fn input(&self, name: &str) -> PortHandle
pub fn output(&self, name: &str) -> PortHandle
pub fn bind_output(&mut self, name: &str, from: &PortHandle)
pub fn build(self) -> Graph
Auto Trait Implementations§
impl<'r> Freeze for GraphCtx<'r>
impl<'r> !RefUnwindSafe for GraphCtx<'r>
impl<'r> Send for GraphCtx<'r>
impl<'r> Sync for GraphCtx<'r>
impl<'r> Unpin for GraphCtx<'r>
impl<'r> !UnwindSafe for GraphCtx<'r>
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