pub enum WrappingStrategy {
None,
AtCol(usize),
SpaceBeforeCol(usize),
AtColWithHyphen(usize),
Cutoff(usize),
Ellipsis(usize),
}
Expand description
Use PixelFont::px_to_cols
to convert pixels to columns
Variants§
None
Don’t wrap, may draw off screen
AtCol(usize)
Splits string at column
SpaceBeforeCol(usize)
Wraps at the first space before column (acts like AtCol if no space is on that line)
AtColWithHyphen(usize)
Same as AtCol but adds a hyphen if it’s splitting a word
Cutoff(usize)
Chops off the end of string it’s over specific length
Ellipsis(usize)
Same as Cutoff but adds an ellipsis
Implementations§
Trait Implementations§
Source§impl Clone for WrappingStrategy
impl Clone for WrappingStrategy
Source§fn clone(&self) -> WrappingStrategy
fn clone(&self) -> WrappingStrategy
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 WrappingStrategy
impl Debug for WrappingStrategy
Source§impl Default for WrappingStrategy
impl Default for WrappingStrategy
Source§fn default() -> WrappingStrategy
fn default() -> WrappingStrategy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WrappingStrategy
impl<'de> Deserialize<'de> for WrappingStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WrappingStrategy
impl PartialEq for WrappingStrategy
Source§impl Serialize for WrappingStrategy
impl Serialize for WrappingStrategy
impl Copy for WrappingStrategy
impl Eq for WrappingStrategy
impl StructuralPartialEq for WrappingStrategy
Auto Trait Implementations§
impl Freeze for WrappingStrategy
impl RefUnwindSafe for WrappingStrategy
impl Send for WrappingStrategy
impl Sync for WrappingStrategy
impl Unpin for WrappingStrategy
impl UnwindSafe for WrappingStrategy
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