pub enum FontFamily<'a> {
    Serif,
    SansSerif,
    Monospace,
    Name(&'a str),
}
Expand description

Describes font family. This can be either a specific font family name, such as “arial”, or a general font family class, such as “serif” and “sans-serif”

Variants

Serif

The system default serif font family

SansSerif

The system default sans-serif font family

Monospace

The system default monospace font

Name(&'a str)

A specific font family name

Implementations

Make a CSS compatible string for the font family name. This can be used as the value of font-family attribute in SVG.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts the value into a TextStyle value. Read more
Specifies the color of the text element Read more
Specifies the position of the text anchor relative to the text element Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Make the font description from the source type
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.