Expand description
Provides alignment information on both axes along with ideal size
Note that the ideal size detail is only used for non-stretch alignment.
Fields
horiz: Alignvert: AlignImplementations
sourceimpl AlignPair
impl AlignPair
sourcepub fn extract<D: Directional>(self, dir: D) -> Align
pub fn extract<D: Directional>(self, dir: D) -> Align
Extract one component, based on a direction
sourcepub fn set_component<D: Directional>(&mut self, dir: D, align: Align)
pub fn set_component<D: Directional>(&mut self, dir: D, align: Align)
Set one component of self, based on a direction
sourcepub fn aligned_rect(&self, ideal: Size, rect: Rect) -> Rect
pub fn aligned_rect(&self, ideal: Size, rect: Rect) -> Rect
Construct a rect of size ideal within rect using the given alignment
Trait Implementations
sourceimpl PartialEq<AlignPair> for AlignPair
impl PartialEq<AlignPair> for AlignPair
impl Copy for AlignPair
impl Eq for AlignPair
impl StructuralEq for AlignPair
impl StructuralPartialEq for AlignPair
Auto Trait Implementations
impl RefUnwindSafe for AlignPair
impl Send for AlignPair
impl Sync for AlignPair
impl Unpin for AlignPair
impl UnwindSafe for AlignPair
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
sourcefn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
Try approximate conversion from Self to T Read more
sourcefn cast_approx(self) -> T
fn cast_approx(self) -> T
Cast approximately from Self to T Read more
sourceimpl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
sourcefn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
sourcefn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
sourcefn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
sourcefn try_cast_trunc(self) -> Result<T, Error>
fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
sourcefn try_cast_nearest(self) -> Result<T, Error>
fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
sourcefn try_cast_floor(self) -> Result<T, Error>
fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
sourcefn try_cast_ceil(self) -> Result<T, Error>
fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.