pub enum TextAffinity {
Upstream,
Downstream,
}Expand description
A way to disambiguate a TextPosition when its offset could match two
different locations in the rendered string.
Variants§
Upstream
The position has affinity for the upstream side of the text position, i.e. in the direction of the beginning of the string.
Downstream
The position has affinity for the downstream side of the text position, i.e. in the direction of the end of the string.
Trait Implementations§
Source§impl Clone for TextAffinity
impl Clone for TextAffinity
Source§fn clone(&self) -> TextAffinity
fn clone(&self) -> TextAffinity
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 TextAffinity
Source§impl Debug for TextAffinity
impl Debug for TextAffinity
Source§impl Default for TextAffinity
impl Default for TextAffinity
Source§fn default() -> TextAffinity
fn default() -> TextAffinity
Returns the “default value” for a type. Read more
impl Eq for TextAffinity
Source§impl Hash for TextAffinity
impl Hash for TextAffinity
Source§impl PartialEq for TextAffinity
impl PartialEq for TextAffinity
impl StructuralPartialEq for TextAffinity
Auto Trait Implementations§
impl Freeze for TextAffinity
impl RefUnwindSafe for TextAffinity
impl Send for TextAffinity
impl Sync for TextAffinity
impl Unpin for TextAffinity
impl UnsafeUnpin for TextAffinity
impl UnwindSafe for TextAffinity
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
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§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.