[][src]Trait moore_common::score::NodeRef

pub trait NodeRef: Copy + Eq + Ord + Hash + Debug + Into<NodeId> {
    pub fn new(id: NodeId) -> Self;

    pub fn alloc() -> Self { ... }
}

A reference to a node.

Newtypes around NodeId should implement this trait to offer functionality common to all node references.

Required methods

pub fn new(id: NodeId) -> Self[src]

Create a new reference from an existing node ID.

Loading content...

Provided methods

pub fn alloc() -> Self[src]

Allocate a new reference.

Creates a new unique reference. Calls NodeId::alloc() under the hood.

Loading content...

Implementors

Loading content...