Trait lattice_graph::lattice_abstract::shapes::AxisDirection
source · [−]pub trait AxisDirection: Clone {
fn is_forward(&self) -> bool;
fn dir_to_index(&self) -> usize;
unsafe fn dir_from_index_unchecked(index: usize) -> Self;
fn dir_from_index(index: usize) -> Option<Self>
where
Self: Sized;
fn is_backward(&self) -> bool { ... }
}
Expand description
Direction of axis. It tells which direction is connected to node.
Required methods
fn is_forward(&self) -> bool
fn is_forward(&self) -> bool
👎 Deprecated:
Use Axis::is_forward_direction instead.
Check this match whith Axis
. It will always return true when Axis
is directed.
fn dir_to_index(&self) -> usize
fn dir_to_index(&self) -> usize
Convert to index.
unsafe fn dir_from_index_unchecked(index: usize) -> Self
unsafe fn dir_from_index_unchecked(index: usize) -> Self
Convert from index.
fn dir_from_index(index: usize) -> Option<Self> where
Self: Sized,
fn dir_from_index(index: usize) -> Option<Self> where
Self: Sized,
Convert from index.
Provided methods
fn is_backward(&self) -> bool
fn is_backward(&self) -> bool
👎 Deprecated:
Use !Axis::is_forward_direction instead.
Check this doesn’t match whith Axis
. It will always return false when Axis
is directed.
Implementors
Implimention for Axis of directed graph.