pub enum Affinity {
Upstream,
Downstream,
}
Expand description
Distinguishes between two visually distinct locations with the same byte index.
Sometimes, a byte location in a document has two visual locations. For example, the end of a soft-wrapped line and the start of the subsequent line have different visual locations (and we want to be able to place an input caret in either place!) but the same byte-wise location. This also shows up in bidirectional text contexts. Affinity allows us to disambiguate between these two visual locations.
Variants§
Auto Trait Implementations§
impl RefUnwindSafe for Affinity
impl Send for Affinity
impl Sync for Affinity
impl Unpin for Affinity
impl UnwindSafe for Affinity
Blanket Implementations§
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.