pub enum TextWidthBasis {
Parent,
LongestLine,
}Expand description
The different ways of measuring the width of one or more lines of text.
Variants§
Parent
Multiline text will take up the full width given by the parent. For single line text, only the minimum amount of width needed to contain the text will be used. A common use case for this is a standard series of paragraphs.
LongestLine
The width will be exactly enough to contain the longest line and no longer. A common use case for this is chat bubbles.
Trait Implementations§
Source§impl Clone for TextWidthBasis
impl Clone for TextWidthBasis
Source§fn clone(&self) -> TextWidthBasis
fn clone(&self) -> TextWidthBasis
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 moreimpl Copy for TextWidthBasis
Source§impl Debug for TextWidthBasis
impl Debug for TextWidthBasis
Source§impl Default for TextWidthBasis
impl Default for TextWidthBasis
Source§fn default() -> TextWidthBasis
fn default() -> TextWidthBasis
Returns the “default value” for a type. Read more
impl Eq for TextWidthBasis
Source§impl Hash for TextWidthBasis
impl Hash for TextWidthBasis
Source§impl PartialEq for TextWidthBasis
impl PartialEq for TextWidthBasis
impl StructuralPartialEq for TextWidthBasis
Auto Trait Implementations§
impl Forget for TextWidthBasis
impl Freeze for TextWidthBasis
impl Move for TextWidthBasis
impl RefUnwindSafe for TextWidthBasis
impl Send for TextWidthBasis
impl Sync for TextWidthBasis
impl Unpin for TextWidthBasis
impl UnsafeUnpin for TextWidthBasis
impl UnwindSafe for TextWidthBasis
Blanket Implementations§
Source§impl<T> AnyEq for T
impl<T> AnyEq for T
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.