Enum layout_engine::align::Alignment
source · [−]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
sourceimpl Alignment
impl Alignment
sourcepub fn align(&self, outer: LayoutInfo, size: usize) -> LayoutInfo
pub fn align(&self, outer: LayoutInfo, size: usize) -> LayoutInfo
Aligns a given axis
Trait Implementations
sourceimpl PartialEq<Alignment> for Alignment
impl PartialEq<Alignment> for Alignment
impl Copy for Alignment
impl StructuralPartialEq for Alignment
Auto Trait Implementations
impl RefUnwindSafe for Alignment
impl Send for Alignment
impl Sync for Alignment
impl Unpin for Alignment
impl UnwindSafe for Alignment
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more