pub enum TextWrapMode {
Extend,
Wrap,
Truncate,
}
Expand description
How to wrap and elide text.
This enum is used in high-level APIs where providing a TextWrapping
is too verbose.
Variants§
Extend
The text should expand the Ui
size when reaching its boundary.
Wrap
The text should wrap to the next line when reaching the Ui
boundary.
Truncate
The text should be elided using “…” when reaching the Ui
boundary.
Note that using TextWrapping
and LayoutJob
offers more control over the elision.
Trait Implementations§
Source§impl Clone for TextWrapMode
impl Clone for TextWrapMode
Source§fn clone(&self) -> TextWrapMode
fn clone(&self) -> TextWrapMode
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 TextWrapMode
impl Debug for TextWrapMode
Source§impl<'de> Deserialize<'de> for TextWrapMode
impl<'de> Deserialize<'de> for TextWrapMode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TextWrapMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TextWrapMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TextWrapMode
impl PartialEq for TextWrapMode
Source§impl Serialize for TextWrapMode
impl Serialize for TextWrapMode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for TextWrapMode
impl Eq for TextWrapMode
impl StructuralPartialEq for TextWrapMode
Auto Trait Implementations§
impl Freeze for TextWrapMode
impl RefUnwindSafe for TextWrapMode
impl Send for TextWrapMode
impl Sync for TextWrapMode
impl Unpin for TextWrapMode
impl UnwindSafe for TextWrapMode
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