#[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 HasParamSpec for Direction
impl HasParamSpec for Direction
source§impl Ord for Direction
impl Ord for Direction
source§impl PartialEq for Direction
impl PartialEq for Direction
source§impl PartialOrd for Direction
impl PartialOrd 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 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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
.