#[repr(u8)]pub enum Dir {
Horiz = 0,
Vert = 1,
}
Expand description
An enumeration of axis-aligned directions.
Variants§
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Dir
impl<'de> Deserialize<'de> for Dir
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 Dir
impl Display for Dir
source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Displays the direction in a human-readable format.
Currently, Dir::Horiz
becomes horizontal
;
Dir::Vert
becomes vertical
.
However, users should not rely on these particular strings.
§Example
assert_eq!(format!("{}", Dir::Horiz), "horizontal");
assert_eq!(format!("{}", Dir::Vert), "vertical");
source§impl Indexable for Dir
impl Indexable for Dir
source§const SET_SIZE: usize = 1usize
const SET_SIZE: usize = 1usize
The number of bytes it will take to represent this type in a set. Read more
§type Iter = DirIndexableIter
type Iter = DirIndexableIter
The type of Iterator that will be returned by [
Self::iter()
]source§impl ReverseIndexable for Dir
impl ReverseIndexable for Dir
source§fn from_index(u: usize) -> Self
fn from_index(u: usize) -> Self
Converts from a usize to
Self
impl Copy for Dir
impl Eq for Dir
impl StructuralPartialEq for Dir
Auto Trait Implementations§
impl RefUnwindSafe for Dir
impl Send for Dir
impl Sync for Dir
impl Unpin for Dir
impl UnwindSafe for Dir
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