pub enum Node<T> {
Binary {
lhs: NodeIndex,
rhs: NodeIndex,
op: BinaryOp,
},
Unary {
input: NodeIndex,
op: UnaryOp,
},
Op {
inputs: Vec<NodeIndex>,
op: Op,
},
Input {
id: AtomicId,
param: bool,
value: T,
},
}
Variants§
Implementations§
Source§impl<T> Node<T>
impl<T> Node<T>
pub fn binary(lhs: NodeIndex, rhs: NodeIndex, op: impl Into<BinaryOp>) -> Self
pub fn unary(input: NodeIndex, op: impl Into<UnaryOp>) -> Self
pub fn op( inputs: impl IntoIterator<Item = NodeIndex>, op: impl Into<Op>, ) -> Self
pub fn input(param: bool, value: T) -> Self
pub fn value(&self) -> T
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Node<T>where
T: Freeze,
impl<T> RefUnwindSafe for Node<T>where
T: RefUnwindSafe,
impl<T> Send for Node<T>where
T: Send,
impl<T> Sync for Node<T>where
T: Sync,
impl<T> Unpin for Node<T>where
T: Unpin,
impl<T> UnwindSafe for Node<T>where
T: 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