pub struct Align { /* private fields */ }Expand description
A renderable that aligns its child within the available space.
Implementations§
Source§impl Align
impl Align
Sourcepub fn left(child: impl Renderable + Send + Sync + 'static) -> Self
pub fn left(child: impl Renderable + Send + Sync + 'static) -> Self
Create a new left-aligned wrapper.
Sourcepub fn center(child: impl Renderable + Send + Sync + 'static) -> Self
pub fn center(child: impl Renderable + Send + Sync + 'static) -> Self
Create a new center-aligned wrapper.
Sourcepub fn right(child: impl Renderable + Send + Sync + 'static) -> Self
pub fn right(child: impl Renderable + Send + Sync + 'static) -> Self
Create a new right-aligned wrapper.
Sourcepub fn vertical(self, vertical: VerticalAlignment) -> Self
pub fn vertical(self, vertical: VerticalAlignment) -> Self
Set vertical alignment.
Trait Implementations§
Source§impl Renderable for Align
impl Renderable for Align
Auto Trait Implementations§
impl Freeze for Align
impl !RefUnwindSafe for Align
impl Send for Align
impl Sync for Align
impl Unpin for Align
impl !UnwindSafe for Align
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
Source§impl<T> Measurable for Twhere
T: Renderable,
impl<T> Measurable for Twhere
T: Renderable,
Source§fn measure(&self, width: usize) -> Measurement
fn measure(&self, width: usize) -> Measurement
Measure this renderable at the given width.