pub enum TextAlignment {
Left,
Right,
Center,
Justify,
}Expand description
Horizontal text alignment within the layout’s line box.
Per CSS Text Module Level 3 text-align.
Variants§
Left
Align lines to the start (left edge for LTR, right edge for RTL).
Right
Align lines to the right edge.
Center
Center lines within the available width.
Justify
Stretch lines to fill the available width by expanding inter-word gaps (the last line of a paragraph is not justified).
Trait Implementations§
Source§impl Clone for TextAlignment
impl Clone for TextAlignment
Source§fn clone(&self) -> TextAlignment
fn clone(&self) -> TextAlignment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextAlignment
impl Debug for TextAlignment
Source§impl Default for TextAlignment
impl Default for TextAlignment
Source§fn default() -> TextAlignment
fn default() -> TextAlignment
Returns the “default value” for a type. Read more
Source§impl Hash for TextAlignment
impl Hash for TextAlignment
Source§impl PartialEq for TextAlignment
impl PartialEq for TextAlignment
Source§fn eq(&self, other: &TextAlignment) -> bool
fn eq(&self, other: &TextAlignment) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TextAlignment
impl Eq for TextAlignment
impl StructuralPartialEq for TextAlignment
Auto Trait Implementations§
impl Freeze for TextAlignment
impl RefUnwindSafe for TextAlignment
impl Send for TextAlignment
impl Sync for TextAlignment
impl Unpin for TextAlignment
impl UnsafeUnpin for TextAlignment
impl UnwindSafe for TextAlignment
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