[][src]Trait rdcl_aoc_helpers::direction::CanTravel

pub trait CanTravel<T> {
    pub fn travel(&self, from: &T) -> T;
pub fn travel_checked(&self, from: &T) -> Option<T>; }

Given a position, determine the next position for a given direction.

Required methods

pub fn travel(&self, from: &T) -> T[src]

Travel in the specified direction.

pub fn travel_checked(&self, from: &T) -> Option<T>[src]

Travel in the specified direction, and return None if this is not possible.

Loading content...

Implementors

impl CanTravel<(i64, i64)> for Direction[src]

impl CanTravel<(usize, usize)> for Direction[src]

Loading content...