Struct ttf_parser::Name [−][src]
pub struct Name<'a> { /* fields omitted */ }Expand description
A Name Record.
Implementations
impl<'a> Name<'a>[src]
impl<'a> Name<'a>[src]pub fn platform_id(&self) -> PlatformId[src]
pub fn platform_id(&self) -> PlatformId[src]Returns the platform ID.
pub fn encoding_id(&self) -> u16[src]
pub fn encoding_id(&self) -> u16[src]Returns the platform-specific encoding ID.
pub fn language_id(&self) -> u16[src]
pub fn language_id(&self) -> u16[src]Returns the language ID.
pub fn to_string(&self) -> Option<String>[src]
pub fn to_string(&self) -> Option<String>[src]Returns 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]
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> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more