pub enum LineAffinity {
Upstream,
Downstream,
}Expand description
Which visual line a caret/handle at a soft-wrap boundary belongs to. At a shared boundary byte (the end of one wrapped visual line IS the start of the next — mid-word wraps produce these) the offset alone is ambiguous:
LineAffinity::Upstreamanchors to the END of the upper line — the glyph a dragging finger means. Selection END and cursor handles, the drawn caret, and the loupe use this; without it a drag along a wrapped line’s right edge snaps the handle one line DOWN and to the left edge.LineAffinity::Downstreamanchors to the START of the lower line — where the first selected glyph actually renders. Selection START handles and highlight geometry use this.
Variants§
Trait Implementations§
Source§impl Clone for LineAffinity
impl Clone for LineAffinity
Source§fn clone(&self) -> LineAffinity
fn clone(&self) -> LineAffinity
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 LineAffinity
Source§impl Debug for LineAffinity
impl Debug for LineAffinity
impl Eq for LineAffinity
Source§impl PartialEq for LineAffinity
impl PartialEq for LineAffinity
impl StructuralPartialEq for LineAffinity
Auto Trait Implementations§
impl Freeze for LineAffinity
impl RefUnwindSafe for LineAffinity
impl Send for LineAffinity
impl Sync for LineAffinity
impl Unpin for LineAffinity
impl UnsafeUnpin for LineAffinity
impl UnwindSafe for LineAffinity
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