Enum cursive_core::direction::Direction
source · pub enum Direction {
Abs(Absolute),
Rel(Relative),
}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§
Implementations§
source§impl Direction
impl Direction
sourcepub const fn relative(self, orientation: Orientation) -> Option<Relative>
pub const fn relative(self, orientation: Orientation) -> Option<Relative>
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.
sourcepub const fn absolute(self, orientation: Orientation) -> Absolute
pub const fn absolute(self, orientation: Orientation) -> Absolute
Returns the absolute direction in the given orientation.
Trait Implementations§
impl Copy for Direction
impl Eq for Direction
impl StructuralPartialEq for Direction
Auto Trait Implementations§
impl Freeze for Direction
impl RefUnwindSafe for Direction
impl Send for Direction
impl Sync for Direction
impl Unpin for Direction
impl UnwindSafe for Direction
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.