Trait pgn4::VisitorCommon[][src]

pub trait VisitorCommon where
    Self: Sized
{ fn last(&self) -> bool;
fn alternatives(&self) -> usize;
fn qturn(&self) -> Option<&QuarterTurn>;
fn next(self) -> Result<Self, VisitingError>;
fn into_alternative(self, alt: usize) -> Result<Self, VisitingError>; fn follow_once<'a>(
        self,
        partial: &mut PartialPath<'a>,
        main: &'a [usize]
    ) -> Result<Self, VisitingError> { ... }
fn follow_path<'a>(
        self,
        partial: &mut PartialPath<'a>,
        path: &'a [usize]
    ) -> Result<Self, VisitingError> { ... } }

All common methods between Visitor and VisitorMut

Required methods

fn last(&self) -> bool[src]

Is this hovered over the last quarterturn in the line

fn alternatives(&self) -> usize[src]

How many alternatives are present on the hovered quarterturn.

fn qturn(&self) -> Option<&QuarterTurn>[src]

View the currently hovered QuarterTurn if it exists

fn next(self) -> Result<Self, VisitingError>[src]

Move the visitor one forward

fn into_alternative(self, alt: usize) -> Result<Self, VisitingError>[src]

Move the visitor into one of the current qturns alternatives. Leaves the visitor at the start of the line without any hovered quarterturn.

Loading content...

Provided methods

fn follow_once<'a>(
    self,
    partial: &mut PartialPath<'a>,
    main: &'a [usize]
) -> Result<Self, VisitingError>
[src]

Follow one step of a path.

fn follow_path<'a>(
    self,
    partial: &mut PartialPath<'a>,
    path: &'a [usize]
) -> Result<Self, VisitingError>
[src]

Follow a path.

Loading content...

Implementors

impl<'a> VisitorCommon for Visitor<'a>[src]

impl<'a> VisitorCommon for VisitorMut<'a>[src]

Loading content...