Enum speedy2d::font::TextAlignment
source · pub enum TextAlignment {
Left,
Center,
Right,
}
Expand description
The horizontal alignment of a block of text. This can be set when calling
TextOptions::with_wrap_words_after_width
.
Variants§
Left
Align the text to the left.
Center
Center the text in the maximum width.
Right
Align the text to the rightmost point within the maximum width.
Trait Implementations§
source§impl Clone for TextAlignment
impl Clone for TextAlignment
source§fn clone(&self) -> TextAlignment
fn clone(&self) -> TextAlignment
Returns a copy of the value. Read more
1.0.0 · 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 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
This method tests for
self
and other
values to be equal, and is used
by ==
.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 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