Struct ttf_parser::Name [−][src]
pub struct Name<'a> { /* fields omitted */ }
A Name Record.
Implementations
impl<'a> Name<'a>
[src]
pub fn platform_id(&self) -> Option<PlatformId>
[src]
Parses the platform ID.
pub fn encoding_id(&self) -> u16
[src]
Parses the platform-specific encoding ID.
pub fn language_id(&self) -> u16
[src]
Parses the language ID.
pub fn name_id(&self) -> u16
[src]
pub fn name(&self) -> &'a [u8]
[src]
Parses the Name’s data as bytes.
Can be empty.
pub fn name_utf8(&self) -> Option<String>
[src]
Parses the Name’s data as a UTF-8 string.
Only Unicode names are supported. And since they are stored as UTF-16BE,
we can’t return &str
and have to allocate a String
.
Supports:
- Unicode Platform ID
- Windows Platform ID + Symbol
- Windows Platform ID + Unicode BMP
pub fn is_unicode(&self) -> bool
[src]
Checks that the current Name data has a Unicode encoding.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Name<'a>
impl<'a> Send for Name<'a>
impl<'a> Sync for Name<'a>
impl<'a> Unpin for Name<'a>
impl<'a> UnwindSafe for Name<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,