#[non_exhaustive]
pub enum Direction {
Ltr,
Rtl,
TtbLtr,
TtbRtl,
WeakLtr,
WeakRtl,
Neutral,
}
Expand description
Direction
represents a direction in the Unicode bidirectional
algorithm.
Not every value in this enumeration makes sense for every usage of
Direction
; for example, the return value of unichar_direction()
and find_base_dir()
cannot be PANGO_DIRECTION_WEAK_LTR
or
PANGO_DIRECTION_WEAK_RTL
, since every character is either neutral
or has a strong direction; on the other hand PANGO_DIRECTION_NEUTRAL
doesn’t make sense to pass to itemize_with_base_dir()
.
The PANGO_DIRECTION_TTB_LTR
, PANGO_DIRECTION_TTB_RTL
values come from
an earlier interpretation of this enumeration as the writing direction
of a block of text and are no longer used. See Gravity
for how
vertical text is handled in Pango.
If you are interested in text direction, you should really use fribidi
directly. Direction
is only retained because it is used in some
public apis.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ltr
A strong left-to-right direction
Rtl
A strong right-to-left direction
TtbLtr
Deprecated value; treated the
same as PANGO_DIRECTION_RTL
.
TtbRtl
Deprecated value; treated the
same as PANGO_DIRECTION_LTR
WeakLtr
A weak left-to-right direction
WeakRtl
A weak right-to-left direction
Neutral
No direction specified
Trait Implementations§
source§impl<'a> FromValue<'a> for Direction
impl<'a> FromValue<'a> for Direction
§type Checker = GenericValueTypeChecker<Direction>
type Checker = GenericValueTypeChecker<Direction>
source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Value
. Read moresource§impl Ord for Direction
impl Ord for Direction
source§impl PartialEq<Direction> for Direction
impl PartialEq<Direction> for Direction
source§impl PartialOrd<Direction> for Direction
impl PartialOrd<Direction> for Direction
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for Direction
impl StaticType for Direction
source§fn static_type() -> Type
fn static_type() -> Type
Self
.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> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere T: StaticType,
source§fn ensure_type()
fn ensure_type()
source§impl<T> ToClosureReturnValue for Twhere
T: ToValue,
impl<T> ToClosureReturnValue for Twhere T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
source§impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere T: Send + ToValue + ?Sized,
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.