pub enum TextTransform {
None,
Uppercase,
Lowercase,
Capitalize,
}Expand description
What a run’s letters are transformed to before they are shaped,
from text-transform.
Variants§
None
none
Uppercase
uppercase
Lowercase
lowercase
Capitalize
capitalize: the first letter of every word.
Implementations§
Source§impl TextTransform
impl TextTransform
Sourcepub fn write(self, letter: char, word_start: bool, out: &mut String) -> bool
pub fn write(self, letter: char, word_start: bool, out: &mut String) -> bool
Writes one character as this transform spells it, and answers
whether that differs from what was read. Case mapping is not
one for one, since ß uppercases to two letters, so what is
written is a stretch of text rather than a character.
word_start is whether the character opens a word, which is
the only thing capitalize reads.
Trait Implementations§
Source§impl Clone for TextTransform
impl Clone for TextTransform
Source§fn clone(&self) -> TextTransform
fn clone(&self) -> TextTransform
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 TextTransform
Source§impl Debug for TextTransform
impl Debug for TextTransform
impl Eq for TextTransform
Source§impl Hash for TextTransform
impl Hash for TextTransform
Source§impl PartialEq for TextTransform
impl PartialEq for TextTransform
Source§impl Serialize for TextTransform
impl Serialize for TextTransform
impl StructuralPartialEq for TextTransform
Auto Trait Implementations§
impl Freeze for TextTransform
impl RefUnwindSafe for TextTransform
impl Send for TextTransform
impl Sync for TextTransform
impl Unpin for TextTransform
impl UnsafeUnpin for TextTransform
impl UnwindSafe for TextTransform
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.