Enum cursive_core::direction::Direction
source ·
[−]Expand description
Represents a direction, either absolute or orientation-dependent.
- Absolute directions are Up, Down, Left, and Right.
- Relative directions are Front and Back.
Variants
Abs(Absolute)
Tuple Fields
0: Absolute
An absolute direction.
Rel(Relative)
Tuple Fields
0: Relative
A direction relative to the current orientation.
Implementations
Returns the relative direction for the given orientation.
Some combination have no corresponding relative position. For example,
Direction::Abs(Up)
means nothing for Orientation::Horizontal
.
Returns the absolute direction in the given orientation
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Direction
impl UnwindSafe for Direction
Blanket Implementations
Mutably borrows from an owned value. Read more