[][src]Struct blitz_path::Route

pub struct Route { /* fields omitted */ }

Describes a route between two points. Giving the total distance needed to travel and a vector of each step needed.

Implementations

impl Route[src]

pub fn steps(&self) -> Vec<Coords2D>[src]

Returns a vector of Coords2D, each representing a step in the path. Organised in reverse order (destination is at [0]) to allow calling .pop() to get each step.

pub fn distance(&self) -> f64[src]

Returns the total distance needed to travel as an f64.

Trait Implementations

impl From<(f64, Vec<(usize, usize)>)> for Route[src]

Auto Trait Implementations

impl RefUnwindSafe for Route

impl Send for Route

impl Sync for Route

impl Unpin for Route

impl UnwindSafe for Route

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.