Struct pathfinder::Node[][src]

pub struct Node<'a> {
    pub hash: u64,
    pub geo: Coordinate,
    pub color: Rgba<u8>,
    pub radius: Option<u32>,
    pub connections: Vec<Link<'a, Node<'a>>>,
}

A positioned object that can be drawn on an image::ImageBuffer.

Fields

Methods

impl<'a> Node<'a>
[src]

Constructs a Node struct.

Links Node self to the provided node's coordinate.

use pathfinder::{Node, Square, Coordinate, Location};
let nodeB: Node = Node::new("B", Coordinate::new(100,100));
let mut nodeA: Node = Node::new("A", Coordinate::new(0,0));
nodeA.link(&nodeB);
assert_eq!(
    nodeA.connections.get(0).unwrap().to.get_coordinate(),
    nodeB.get_coordinate());

Trait Implementations

impl<'a> PartialEq for Node<'a>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Clone for Node<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Debug for Node<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> Location for Node<'a>
[src]

impl<'a> Draw for Node<'a>
[src]

impl<'a> Hash for Node<'a>
[src]

Auto Trait Implementations

impl<'a> Send for Node<'a>

impl<'a> Sync for Node<'a>