pub enum LinearDirection {
Forward = 1,
Backward = -1,
Stay = 0,
}
Expand description
The LinearDirection
implementation enumerates the three pssoible movements in
one-dimensional space, namely:
Variants§
Implementations§
Source§impl LinearDirection
impl LinearDirection
Sourcepub const fn is_forward(&self) -> bool
pub const fn is_forward(&self) -> bool
Returns true if the enum is LinearDirection::Forward otherwise false
Sourcepub const fn is_backward(&self) -> bool
pub const fn is_backward(&self) -> bool
Returns true if the enum is LinearDirection::Backward otherwise false
Source§impl LinearDirection
impl LinearDirection
pub fn from_isize(value: isize) -> Self
Trait Implementations§
Source§impl AsRef<str> for LinearDirection
impl AsRef<str> for LinearDirection
Source§impl Clone for LinearDirection
impl Clone for LinearDirection
Source§fn clone(&self) -> LinearDirection
fn clone(&self) -> LinearDirection
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LinearDirection
impl Debug for LinearDirection
Source§impl Default for LinearDirection
impl Default for LinearDirection
Source§fn default() -> LinearDirection
fn default() -> LinearDirection
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LinearDirection
impl<'de> Deserialize<'de> for LinearDirection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for LinearDirection
impl Display for LinearDirection
Source§impl FromStr for LinearDirection
impl FromStr for LinearDirection
Source§impl Hash for LinearDirection
impl Hash for LinearDirection
Source§impl IntoEnumIterator for LinearDirection
impl IntoEnumIterator for LinearDirection
type Iterator = LinearDirectionIter
fn iter() -> LinearDirectionIter ⓘ
Source§impl Ord for LinearDirection
impl Ord for LinearDirection
Source§fn cmp(&self, other: &LinearDirection) -> Ordering
fn cmp(&self, other: &LinearDirection) -> 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 LinearDirection
impl PartialEq for LinearDirection
Source§impl PartialOrd for LinearDirection
impl PartialOrd for LinearDirection
Source§impl Serialize for LinearDirection
impl Serialize for LinearDirection
Source§impl TryFrom<&str> for LinearDirection
impl TryFrom<&str> for LinearDirection
Source§impl VariantNames for LinearDirection
impl VariantNames for LinearDirection
impl Copy for LinearDirection
impl Eq for LinearDirection
impl StructuralPartialEq for LinearDirection
Auto Trait Implementations§
impl Freeze for LinearDirection
impl RefUnwindSafe for LinearDirection
impl Send for LinearDirection
impl Sync for LinearDirection
impl Unpin for LinearDirection
impl UnwindSafe for LinearDirection
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