Enum druid_shell::text::Affinity [−][src]
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 UnwindSafe for Affinity
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn round_from(x: T) -> T
pub fn round_from(x: T) -> T
Performs the conversion.
pub fn round_into(self) -> U
pub fn round_into(self) -> U
Performs the conversion.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more