[][src]Enum pango::Direction

#[non_exhaustive]pub enum Direction {
    Ltr,
    Rtl,
    TtbLtr,
    TtbRtl,
    WeakLtr,
    WeakRtl,
    Neutral,
    // 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.
Ltr

A strong left-to-right direction

Rtl

A strong right-to-left direction

TtbLtr

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

TtbRtl

Deprecated value; treated the same as Direction::Ltr

WeakLtr

A weak left-to-right direction

WeakRtl

A weak right-to-left direction

Neutral

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
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

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
[src]

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.