pub struct Node<'a> {
pub operation: Operation<'a>,
pub inputs: &'a [LinkIndex],
pub outputs: &'a [LinkIndex],
pub regions: &'a [RegionId],
pub meta: &'a [TermId],
pub signature: Option<TermId>,
}
Expand description
Nodes in the hugr graph.
See ast::Node
for the AST representation.
Fields§
§operation: Operation<'a>
The operation that the node performs.
inputs: &'a [LinkIndex]
The input ports of the node.
outputs: &'a [LinkIndex]
The output ports of the node.
regions: &'a [RegionId]
The regions of the node.
meta: &'a [TermId]
The meta information attached to the node.
signature: Option<TermId>
The signature of the node.
Can be None
to indicate that the node’s signature should be inferred,
or for nodes with operations that do not have a signature.
Trait Implementations§
impl<'a> Eq for Node<'a>
impl<'a> StructuralPartialEq for Node<'a>
Auto Trait Implementations§
impl<'a> Freeze for Node<'a>
impl<'a> RefUnwindSafe for Node<'a>
impl<'a> Send for Node<'a>
impl<'a> Sync for Node<'a>
impl<'a> Unpin for Node<'a>
impl<'a> UnwindSafe for Node<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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