#[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
Source§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 HasParamSpec for Direction
impl HasParamSpec for Direction
Source§impl Ord for Direction
impl Ord for Direction
Source§impl PartialOrd for Direction
impl PartialOrd for Direction
Source§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 StructuralPartialEq for Direction
Auto Trait Implementations§
impl Freeze for Direction
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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
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> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.