pub enum VAlign {
Top,
Middle,
Bottom,
}Expand description
Vertical alignment within a bounded rectangle.
Variants§
Top
Align text to the top edge (default).
Middle
Centre text vertically.
Bottom
Align text to the bottom edge.
Implementations§
Source§impl VAlign
impl VAlign
Sourcepub const fn offset(self, area_height: u16, content_height: u16) -> u16
pub const fn offset(self, area_height: u16, content_height: u16) -> u16
The top offset, in rows, at which content_height rows of content should start within
an area_height-row area for this alignment.
Saturates at 0 when the content is taller than the area, so the caller clips from the
top edge rather than underflowing.
Trait Implementations§
impl Copy for VAlign
impl Eq for VAlign
impl StructuralPartialEq for VAlign
Auto Trait Implementations§
impl Freeze for VAlign
impl RefUnwindSafe for VAlign
impl Send for VAlign
impl Sync for VAlign
impl Unpin for VAlign
impl UnsafeUnpin for VAlign
impl UnwindSafe for VAlign
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