pub struct NodeInstance {
pub node: NodeNode,
pub static_args: StaticArgs,
}Expand description
A node and a set of static arguments for it
Non-parametric nodes always have one and only one instance. Parametric notes may have as many instances as the number of possible values that a tuple matching its static parameters types could hold. In reality, only instances that are directly or indirectly referred to in the code will be created.
§See also
all_instancesto obtain a compilation unit-wide list of node instances
Fields§
§node: NodeNode§static_args: StaticArgsImplementations§
Source§impl NodeInstance
impl NodeInstance
pub fn new_non_parametric(node: NodeNode) -> Self
pub fn new_parametric(node: NodeNode, static_args: StaticArgs) -> Self
pub fn is_parametric(&self) -> bool
Trait Implementations§
Source§impl Clone for NodeInstance
impl Clone for NodeInstance
Source§fn clone(&self) -> NodeInstance
fn clone(&self) -> NodeInstance
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NodeInstance
impl Debug for NodeInstance
Source§impl From<NodeInstance> for StaticArg
impl From<NodeInstance> for StaticArg
Source§fn from(value: NodeInstance) -> Self
fn from(value: NodeInstance) -> Self
Converts to this type from the input type.
Source§impl Hash for NodeInstance
impl Hash for NodeInstance
Source§impl Ord for NodeInstance
impl Ord for NodeInstance
Source§impl PartialEq for NodeInstance
impl PartialEq for NodeInstance
Source§impl PartialOrd for NodeInstance
impl PartialOrd for NodeInstance
impl Eq for NodeInstance
impl StructuralPartialEq for NodeInstance
Auto Trait Implementations§
impl Freeze for NodeInstance
impl !RefUnwindSafe for NodeInstance
impl !Send for NodeInstance
impl !Sync for NodeInstance
impl Unpin for NodeInstance
impl !UnwindSafe for NodeInstance
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