#[non_exhaustive]pub enum SplitDir {
Horizontal,
Vertical,
}Expand description
Direction of a split.
#[non_exhaustive] — new directions may be added in minor releases.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Horizontal
Stacked top-to-bottom (:split / :sp).
Vertical
Side-by-side left-to-right (:vsplit / :vsp).
Implementations§
Source§impl SplitDir
impl SplitDir
Sourcepub fn axis(self) -> Axis
pub fn axis(self) -> Axis
Map this direction to its Axis.
Horizontal splits stacked vertically → they separate rows
(Axis::Row). Vertical splits arranged side-by-side → they
separate columns (Axis::Col).
Unknown future variants fall back to Axis::Row so callers always
receive a valid answer without panicking.
Trait Implementations§
impl Copy for SplitDir
impl Eq for SplitDir
impl StructuralPartialEq for SplitDir
Auto Trait Implementations§
impl Freeze for SplitDir
impl RefUnwindSafe for SplitDir
impl Send for SplitDir
impl Sync for SplitDir
impl Unpin for SplitDir
impl UnsafeUnpin for SplitDir
impl UnwindSafe for SplitDir
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