[][src]Enum pango::AttrType

#[non_exhaustive]pub enum AttrType {
    Invalid,
    Language,
    Family,
    Style,
    Weight,
    Variant,
    Stretch,
    Size,
    FontDesc,
    Foreground,
    Background,
    Underline,
    Strikethrough,
    Rise,
    Shape,
    Scale,
    Fallback,
    LetterSpacing,
    UnderlineColor,
    StrikethroughColor,
    AbsoluteSize,
    Gravity,
    GravityHint,
    FontFeatures,
    ForegroundAlpha,
    BackgroundAlpha,
    AllowBreaks,
    Show,
    InsertHyphens,
    // some variants omitted
}

The AttrType distinguishes between different types of attributes. Along with the predefined values, it is possible to allocate additional values for custom attributes using AttrType::register. The predefined values are given below. The type of structure used to store the attribute is listed in parentheses after the description.

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.
Invalid

does not happen

Language

language (AttrLanguage)

Family

font family name list (AttrString)

Style

font slant style (AttrInt)

Weight

font weight (AttrInt)

Variant

font variant (normal or small caps) (AttrInt)

Stretch

font stretch (AttrInt)

Size

font size in points scaled by PANGO_SCALE (AttrInt)

FontDesc

font description (AttrFontDesc)

Foreground

foreground color (AttrColor)

Background

background color (AttrColor)

Underline

whether the text has an underline (AttrInt)

Strikethrough

whether the text is struck-through (AttrInt)

Rise

baseline displacement (AttrInt)

Shape

shape (AttrShape)

Scale

font size scale factor (AttrFloat)

Fallback

whether fallback is enabled (AttrInt)

LetterSpacing

letter spacing (AttrInt)

UnderlineColor

underline color (AttrColor)

StrikethroughColor

strikethrough color (AttrColor)

AbsoluteSize

font size in pixels scaled by PANGO_SCALE (AttrInt)

Gravity

base text gravity (AttrInt)

GravityHint

gravity hint (AttrInt)

FontFeatures

OpenType font features (AttrString). Since 1.38

ForegroundAlpha

foreground alpha (AttrInt). Since 1.38

BackgroundAlpha

background alpha (AttrInt). Since 1.38

AllowBreaks

whether breaks are allowed (AttrInt). Since 1.44

Show

how to render invisible characters (AttrInt). Since 1.44

InsertHyphens

whether to insert hyphens at intra-word line breaks (AttrInt). Since 1.44

Trait Implementations

impl Clone for AttrType[src]

impl Copy for AttrType[src]

impl Debug for AttrType[src]

impl Display for AttrType[src]

impl Eq for AttrType[src]

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

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

impl Hash for AttrType[src]

impl Ord for AttrType[src]

impl PartialEq<AttrType> for AttrType[src]

impl PartialOrd<AttrType> for AttrType[src]

impl SetValue for AttrType[src]

impl StaticType for AttrType[src]

impl StructuralEq for AttrType[src]

impl StructuralPartialEq for AttrType[src]

Auto Trait Implementations

impl RefUnwindSafe for AttrType

impl Send for AttrType

impl Sync for AttrType

impl Unpin for AttrType

impl UnwindSafe for AttrType

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.