Enum iron_shapes::isotropy::Orientation2D
source · pub enum Orientation2D {
Horizontal,
Vertical,
}Expand description
Orientation in two dimensions along one of the axes.
Variants§
Implementations§
source§impl Orientation2D
impl Orientation2D
sourcepub fn direction(self, d1: Direction1D) -> Direction2D
pub fn direction(self, d1: Direction1D) -> Direction2D
Get the positive or negative direction aligned with this orientation.
sourcepub fn is_vertical(&self) -> bool
pub fn is_vertical(&self) -> bool
Check if orientation is vertical.
sourcepub fn is_horizontal(&self) -> bool
pub fn is_horizontal(&self) -> bool
Check if orientation is horizontal.
Trait Implementations§
source§impl Clone for Orientation2D
impl Clone for Orientation2D
source§fn clone(&self) -> Orientation2D
fn clone(&self) -> Orientation2D
Returns a copy 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 Orientation2D
impl Debug for Orientation2D
source§impl<'de> Deserialize<'de> for Orientation2D
impl<'de> Deserialize<'de> for Orientation2D
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 Hash for Orientation2D
impl Hash for Orientation2D
source§impl Ord for Orientation2D
impl Ord for Orientation2D
source§fn cmp(&self, other: &Orientation2D) -> Ordering
fn cmp(&self, other: &Orientation2D) -> 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<Orientation2D> for Orientation2D
impl PartialEq<Orientation2D> for Orientation2D
source§fn eq(&self, other: &Orientation2D) -> bool
fn eq(&self, other: &Orientation2D) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<Orientation2D> for Orientation2D
impl PartialOrd<Orientation2D> for Orientation2D
source§fn partial_cmp(&self, other: &Orientation2D) -> Option<Ordering>
fn partial_cmp(&self, other: &Orientation2D) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more