Enum egui::Align[]

pub enum Align {
    Min,
    Center,
    Max,
}

left/center/right or top/center/bottom alignment for e.g. anchors and layouts.

Variants

Min

Left or top.

Center

Horizontal or vertical center.

Max

Right or bottom.

Implementations

impl Align

pub const LEFT: Align

Convenience for Self::Min

pub const RIGHT: Align

Convenience for Self::Max

pub const TOP: Align

Convenience for Self::Min

pub const BOTTOM: Align

Convenience for Self::Max

pub fn left() -> Align

👎 Deprecated:

Use Self::LEFT

pub fn right() -> Align

👎 Deprecated:

Use Self::RIGHT

pub fn top() -> Align

👎 Deprecated:

Use Self::TOP

pub fn bottom() -> Align

👎 Deprecated:

Use Self::BOTTOM

pub fn to_factor(&self) -> f32

Convert Min => 0.0, Center => 0.5 or Max => 1.0.

Trait Implementations

impl Clone for Align

impl Copy for Align

impl Debug for Align

impl Default for Align

impl PartialEq<Align> for Align

impl StructuralPartialEq for Align

Auto Trait Implementations

impl RefUnwindSafe for Align

impl Send for Align

impl Sync for Align

impl Unpin for Align

impl UnwindSafe for Align

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.