pub enum DirectedSquareAxis {
X = 0,
Y = 1,
RX = 2,
RY = 3,
}Expand description
Axis for directed square graph.
Variants§
Trait Implementations§
Source§impl Axis for DirectedSquareAxis
impl Axis for DirectedSquareAxis
Source§type Direction = DirectedSquareAxis
type Direction = DirectedSquareAxis
For tricks to optimize for undirected graph, and not to regress performance of directed graph.
If the axis is
DIRECTED, should set Self.Source§fn from_index(index: usize) -> Option<Self>
fn from_index(index: usize) -> Option<Self>
Convert form index.
Source§fn backward(self) -> Self::Direction
fn backward(self) -> Self::Direction
To backward direction. It reverses when Axis is
DIRECTED.Source§fn from_direction(dir: Self::Direction) -> Self
fn from_direction(dir: Self::Direction) -> Self
Convert from direction.
Source§const UNDIRECTED_COUNT: usize = _
const UNDIRECTED_COUNT: usize = _
Number of direction. If this axis is not directed, it is
COUNT * 2, otherwise COUNT.Source§unsafe fn from_index_unchecked(index: usize) -> Self
unsafe fn from_index_unchecked(index: usize) -> Self
Convert form index.
Source§fn is_forward_direction(dir: &Self::Direction) -> bool
fn is_forward_direction(dir: &Self::Direction) -> bool
Check the direction is forward for this axis.
Returns true if the direction is
DIRECTED is true, or the index of the axis and direction matches.Source§impl Clone for DirectedSquareAxis
impl Clone for DirectedSquareAxis
Source§fn clone(&self) -> DirectedSquareAxis
fn clone(&self) -> DirectedSquareAxis
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DirectedSquareAxis
impl Debug for DirectedSquareAxis
Source§impl Hash for DirectedSquareAxis
impl Hash for DirectedSquareAxis
Source§impl Ord for DirectedSquareAxis
impl Ord for DirectedSquareAxis
Source§fn cmp(&self, other: &DirectedSquareAxis) -> Ordering
fn cmp(&self, other: &DirectedSquareAxis) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DirectedSquareAxis
impl PartialEq for DirectedSquareAxis
Source§impl PartialOrd for DirectedSquareAxis
impl PartialOrd for DirectedSquareAxis
impl Copy for DirectedSquareAxis
impl Eq for DirectedSquareAxis
impl StructuralPartialEq for DirectedSquareAxis
Auto Trait Implementations§
impl Freeze for DirectedSquareAxis
impl RefUnwindSafe for DirectedSquareAxis
impl Send for DirectedSquareAxis
impl Sync for DirectedSquareAxis
impl Unpin for DirectedSquareAxis
impl UnwindSafe for DirectedSquareAxis
Blanket Implementations§
Source§impl<A> AxisDirection for Awhere
A: Axis<Direction = A>,
impl<A> AxisDirection for Awhere
A: Axis<Direction = A>,
Source§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.Source§fn dir_to_index(&self) -> usize
fn dir_to_index(&self) -> usize
Convert to index.
Source§unsafe fn dir_from_index_unchecked(index: usize) -> A
unsafe fn dir_from_index_unchecked(index: usize) -> A
Convert from index.
Source§fn dir_from_index(index: usize) -> Option<A>
fn dir_from_index(index: usize) -> Option<A>
Convert from index.
Source§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.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> ConstOrValue<T> for T
impl<T> ConstOrValue<T> for T
Source§const IS_CONST_WRAP: bool = false
const IS_CONST_WRAP: bool = false
get wheter the type is const generic wrapper.
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.