pub struct Node {
pub name: String,
pub location: Vec2,
}
Expand description
A node in the graph with a name and a location.
The name is used to identify the node and the location is used to calculate the distance between nodes and to draw the graph in a 2D space.
This struct is used by the Graph
struct to store the nodes
and their names within the repr field.
Fields§
§name: String
The name of the node
location: Vec2
The location of the node in a 2D space
Trait Implementations§
source§impl PartialEq<Node> for Node
impl PartialEq<Node> for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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