pub enum Position {
Relative,
Absolute,
Fixed,
}Expand description
Positioning mode for elements.
Determines how an element is positioned relative to its parent or the viewport.
Variants§
Relative
Element is positioned in normal document flow (default) Children are laid out according to parent’s direction
Absolute
Element is positioned relative to its nearest positioned ancestor Removed from normal document flow, doesn’t affect sibling layout
Fixed
Element is positioned relative to the viewport Similar to absolute but always relative to the terminal window
Trait Implementations§
impl Copy for Position
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
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