pub enum Direction {
Left,
Right,
Upstream,
Downstream,
}
Expand description
Indicates a horizontal direction in the text.
Variants§
Left
The direction visually to the left.
This may be byte-wise forwards or backwards in the document, depending on the text direction around the position being moved.
Right
The direction visually to the right.
This may be byte-wise forwards or backwards in the document, depending on the text direction around the position being moved.
Upstream
Byte-wise backwards in the document.
In a left-to-right context, this value is the same as Left
.
Downstream
Byte-wise forwards in the document.
In a left-to-right context, this value is the same as Right
.
Implementations§
source§impl Direction
impl Direction
sourcepub fn is_upstream_for_direction(self, direction: WritingDirection) -> bool
pub fn is_upstream_for_direction(self, direction: WritingDirection) -> bool
Returns true
if this direction is byte-wise backwards for
the provided WritingDirection
.
The provided direction must not be WritingDirection::Natural
.
Trait Implementations§
source§impl PartialEq<Direction> for Direction
impl PartialEq<Direction> for Direction
impl Copy for Direction
impl Eq for Direction
impl StructuralEq for Direction
impl StructuralPartialEq for Direction
Auto Trait Implementations§
impl RefUnwindSafe for Direction
impl Send for Direction
impl Sync for Direction
impl Unpin for Direction
impl UnwindSafe for Direction
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§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.