pub trait AxisDirection: Clone {
// Required methods
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;
// Provided method
fn is_backward(&self) -> bool { ... }
}Expand description
Direction of axis. It tells which direction is connected to node.
Required Methods§
Sourcefn is_forward(&self) -> bool
👎Deprecated: Use Axis::is_forward_direction instead.
fn is_forward(&self) -> bool
Check this match whith Axis. It will always return true when Axis is directed.
Sourcefn dir_to_index(&self) -> usize
fn dir_to_index(&self) -> usize
Convert to index.
Sourceunsafe fn dir_from_index_unchecked(index: usize) -> Self
unsafe fn dir_from_index_unchecked(index: usize) -> Self
Convert from index.
Sourcefn 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§
Sourcefn is_backward(&self) -> bool
👎Deprecated: Use !Axis::is_forward_direction instead.
fn is_backward(&self) -> bool
Check this doesn’t match whith Axis. It will always return false when Axis is directed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<A> AxisDirection for Awhere
A: Axis<Direction = Self>,
Implimention for Axis of directed graph.