pub enum Direction<T> {
Foward(T),
Backward(T),
}👎Deprecated
Expand description
Implimention of AxisDirection when Axis::DIRECTED is false.
Variants§
Trait Implementations§
Source§impl<T: Axis> AxisDirection for Direction<T>
impl<T: Axis> AxisDirection for Direction<T>
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) -> Self
unsafe fn dir_from_index_unchecked(index: usize) -> Self
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: Ord> Ord for Direction<T>
impl<T: Ord> Ord for Direction<T>
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<T: PartialOrd> PartialOrd for Direction<T>
impl<T: PartialOrd> PartialOrd for Direction<T>
impl<T: Copy> Copy for Direction<T>
impl<T: Eq> Eq for Direction<T>
impl<T> StructuralPartialEq for Direction<T>
Auto Trait Implementations§
impl<T> Freeze for Direction<T>where
T: Freeze,
impl<T> RefUnwindSafe for Direction<T>where
T: RefUnwindSafe,
impl<T> Send for Direction<T>where
T: Send,
impl<T> Sync for Direction<T>where
T: Sync,
impl<T> Unpin for Direction<T>where
T: Unpin,
impl<T> UnwindSafe for Direction<T>where
T: UnwindSafe,
Blanket Implementations§
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.