Struct swash::LocalizedString [−][src]
pub struct LocalizedString<'a> { /* fields omitted */ }
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
impl<'a> LocalizedString<'a>
[src]
impl<'a> LocalizedString<'a>
[src]pub fn id(&self) -> StringId
[src]
Returns the string identifier.
pub fn language(&self) -> &str
[src]
Returns the language of the string.
pub fn is_unicode(&self) -> bool
[src]
Returns true if the encoding for the string is unicode.
pub fn is_decodable(&self) -> bool
[src]
Returns true if the string can be decoded.
pub fn chars(&self) -> Chars<'a>ⓘ
[src]
Returns an iterator over the sequence of characters representing the decoded string if the encoding is known. Will generate an empty string otherwise.
pub fn to_string(&self) -> String
[src]
Converts the string to a standard string.
Trait Implementations
impl<'a> Clone for LocalizedString<'a>
[src]
impl<'a> Clone for LocalizedString<'a>
[src]fn clone(&self) -> LocalizedString<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for LocalizedString<'a>
[src]
impl<'a> Copy for LocalizedString<'a>
[src]impl<'a> IntoIterator for LocalizedString<'a>
[src]
impl<'a> IntoIterator for LocalizedString<'a>
[src]Auto Trait Implementations
impl<'a> RefUnwindSafe for LocalizedString<'a>
impl<'a> RefUnwindSafe for LocalizedString<'a>
impl<'a> Send for LocalizedString<'a>
impl<'a> Send for LocalizedString<'a>
impl<'a> Sync for LocalizedString<'a>
impl<'a> Sync for LocalizedString<'a>
impl<'a> Unpin for LocalizedString<'a>
impl<'a> Unpin for LocalizedString<'a>
impl<'a> UnwindSafe for LocalizedString<'a>
impl<'a> UnwindSafe for LocalizedString<'a>