pub enum Alignment {
Begin,
Center,
End,
Expand,
}
Expand description
A struct representing horizontal/vertical alignment
Variants§
Begin
The object should be aligned at the begining of the axis
Center
The object should be centered on the axis
End
The object should be at the end of the axis.
Expand
The object should take us much space as possible on the axis
Implementations§
Source§impl Alignment
impl Alignment
Sourcepub const fn align(&self, outer: LayoutInfo, size: usize) -> LayoutInfo
pub const fn align(&self, outer: LayoutInfo, size: usize) -> LayoutInfo
Aligns a given axis
Trait Implementations§
impl Copy for Alignment
impl StructuralPartialEq for Alignment
Auto Trait Implementations§
impl Freeze for Alignment
impl RefUnwindSafe for Alignment
impl Send for Alignment
impl Sync for Alignment
impl Unpin for Alignment
impl UnwindSafe for Alignment
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