Struct swash::LocalizedString[][src]

pub struct LocalizedString<'a> { /* fields omitted */ }
Expand description

Represents a single localized string in a font.

Localized strings contain an identifier that describes the content of the string (such as family name, copyright notice, sample text, etc), a language that specifies the audience for which the string is intended and some encoded data containing the value of the string. A string with a particular identifier can appear multiple times in a font with various languages and encodings.

Implementations

Returns the string identifier.

Returns the language of the string.

Returns true if the encoding for the string is unicode.

Returns true if the string can be decoded.

Returns an iterator over the sequence of characters representing the decoded string if the encoding is known. Will generate an empty string otherwise.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Which kind of iterator are we turning this into?

The type of the elements being iterated over.

Creates an iterator from a value. 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. 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.