pub enum SheetEdge {
Bottom,
Top,
Start,
End,
}Expand description
Which window edge a sheet attaches to.
Start / End are logical, mirroring under
crate::LayoutDirection::Rtl just like every other axis-aligned
vocabulary in snora. Top / Bottom are direction-independent.
Variants§
Bottom
Slides up from the bottom of the window. The historical default; matches the “drawer from below” idiom.
Top
Slides down from the top of the window.
Start
Slides in from the logical start edge (LTR=left, RTL=right).
End
Slides in from the logical end edge (LTR=right, RTL=left).
Implementations§
Source§impl SheetEdge
impl SheetEdge
Sourcepub fn is_vertical(self) -> bool
pub fn is_vertical(self) -> bool
Whether this edge anchors along the vertical axis.
true for Top / Bottom; false for Start / End.
§Example
use snora_core::SheetEdge;
assert!(SheetEdge::Top.is_vertical());
assert!(SheetEdge::Bottom.is_vertical());
assert!(!SheetEdge::Start.is_vertical());Sourcepub fn is_horizontal(self) -> bool
pub fn is_horizontal(self) -> bool
Whether this edge anchors along the horizontal axis.
true for Start / End; false for Top / Bottom.
Always the inverse of Self::is_vertical.
Trait Implementations§
impl Copy for SheetEdge
impl Eq for SheetEdge
impl StructuralPartialEq for SheetEdge
Auto Trait Implementations§
impl Freeze for SheetEdge
impl RefUnwindSafe for SheetEdge
impl Send for SheetEdge
impl Sync for SheetEdge
impl Unpin for SheetEdge
impl UnsafeUnpin for SheetEdge
impl UnwindSafe for SheetEdge
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