pub enum TextAlign {
Left,
Right,
Center,
Justify,
Start,
End,
}Expand description
Whether and how to align text horizontally.
The order of this enum must match the order of the values in RenderStyleConstants.h’s ETextAlign.
Variants§
Left
Align the text on the left edge of the container.
Right
Align the text on the right edge of the container.
Center
Align the text in the center of the container.
Justify
Stretch lines of text that end with a soft line break to fill the width of the container.
Lines that end with hard line breaks are aligned towards the Start edge.
Start
Align the text on the leading edge of the container.
For left-to-right text (TextDirection::Ltr), this is the left edge.
For right-to-left text (TextDirection::Rtl), this is the right edge.
End
Align the text on the trailing edge of the container.
For left-to-right text (TextDirection::Ltr), this is the right edge.
For right-to-left text (TextDirection::Rtl), this is the left edge.
Trait Implementations§
impl Copy for TextAlign
impl Eq for TextAlign
impl StructuralPartialEq for TextAlign
Auto Trait Implementations§
impl Freeze for TextAlign
impl RefUnwindSafe for TextAlign
impl Send for TextAlign
impl Sync for TextAlign
impl Unpin for TextAlign
impl UnsafeUnpin for TextAlign
impl UnwindSafe for TextAlign
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.