Enum cursive_core::direction::Absolute
source · pub enum Absolute {
Left,
Up,
Right,
Down,
None,
}Expand description
Absolute direction (up, down, left, right).
Variants§
Left
Left
Up
Up
Right
Right
Down
Down
None
No real direction.
Used when the “direction” is across layers for instance.
Implementations§
source§impl Absolute
impl Absolute
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.
Returns None when the direction does not apply to the given
orientation (ex: Left and Vertical).
sourcepub const fn split(self) -> (Orientation, Relative)
pub const fn split(self) -> (Orientation, Relative)
Splits this absolute direction into an orientation and relative direction.
For example, Right will give (Horizontal, Back).
Trait Implementations§
source§impl Resolvable for Absolute
impl Resolvable for Absolute
impl Copy for Absolute
impl Eq for Absolute
impl StructuralPartialEq for Absolute
Auto Trait Implementations§
impl Freeze for Absolute
impl RefUnwindSafe for Absolute
impl Send for Absolute
impl Sync for Absolute
impl Unpin for Absolute
impl UnwindSafe for Absolute
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.