pub enum JustifyMode {
Left,
Right,
Center,
Full,
Distributed,
}Expand description
Text alignment mode.
Variants§
Left
Left-aligned (ragged right). No space stretching.
Right
Right-aligned (ragged left).
Center
Centered text.
Full
Fully justified: spaces are stretched/shrunk to fill the line width. The last line of each paragraph is left-aligned (TeX default).
Distributed
Distributed justification: like Full, but the last line is also justified (CJK convention).
Implementations§
Source§impl JustifyMode
impl JustifyMode
Sourcepub const fn requires_justification(&self) -> bool
pub const fn requires_justification(&self) -> bool
Whether this mode requires space modulation (stretch/shrink).
Sourcepub const fn justify_last_line(&self) -> bool
pub const fn justify_last_line(&self) -> bool
Whether the last line of a paragraph should be justified.
Trait Implementations§
Source§impl Clone for JustifyMode
impl Clone for JustifyMode
Source§fn clone(&self) -> JustifyMode
fn clone(&self) -> JustifyMode
Returns a duplicate 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 JustifyMode
impl Debug for JustifyMode
Source§impl Default for JustifyMode
impl Default for JustifyMode
Source§fn default() -> JustifyMode
fn default() -> JustifyMode
Returns the “default value” for a type. Read more
Source§impl Display for JustifyMode
impl Display for JustifyMode
Source§impl Hash for JustifyMode
impl Hash for JustifyMode
Source§impl PartialEq for JustifyMode
impl PartialEq for JustifyMode
impl Copy for JustifyMode
impl Eq for JustifyMode
impl StructuralPartialEq for JustifyMode
Auto Trait Implementations§
impl Freeze for JustifyMode
impl RefUnwindSafe for JustifyMode
impl Send for JustifyMode
impl Sync for JustifyMode
impl Unpin for JustifyMode
impl UnwindSafe for JustifyMode
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> 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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.