[][src]Enum pango::Direction

#[non_exhaustive]pub enum Direction {
    // some variants omitted

The Direction type 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 pango_unichar_direction and pango_find_base_dir cannot be Direction::WeakLtr or Direction::WeakRtl, since every character is either neutral or has a strong direction; on the other hand Direction::Neutral doesn't make sense to pass to pango_itemize_with_base_dir.

The Direction::TtbLtr, Direction::TtbRtl 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. PangoDirection is only retained because it is used in some public apis.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

A strong left-to-right direction


A strong right-to-left direction


Deprecated value; treated the same as Direction::Rtl.


Deprecated value; treated the same as Direction::Ltr


A weak left-to-right direction


A weak right-to-left direction


No direction specified

Trait Implementations

impl Clone for Direction[src]

impl Copy for Direction[src]

impl Debug for Direction[src]

impl Display for Direction[src]

impl Eq for Direction[src]

impl<'a> FromValue<'a> for Direction[src]

impl<'a> FromValueOptional<'a> for Direction[src]

impl Hash for Direction[src]

impl Ord for Direction[src]

impl PartialEq<Direction> for Direction[src]

impl PartialOrd<Direction> for Direction[src]

impl SetValue for Direction[src]

impl StaticType for Direction[src]

impl StructuralEq for Direction[src]

impl StructuralPartialEq for Direction[src]

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

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.