pub struct Name<'a> { /* private fields */ }
Expand description
A Name Record.
Implementations§
Source§impl<'a> Name<'a>
impl<'a> Name<'a>
Sourcepub fn platform_id(&self) -> PlatformId
pub fn platform_id(&self) -> PlatformId
Returns the platform ID.
Sourcepub fn encoding_id(&self) -> u16
pub fn encoding_id(&self) -> u16
Returns the platform-specific encoding ID.
Sourcepub fn language_id(&self) -> u16
pub fn language_id(&self) -> u16
Returns the language ID.
Sourcepub fn to_string(&self) -> Option<String>
pub fn to_string(&self) -> Option<String>
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
Sourcepub fn is_unicode(&self) -> bool
pub fn is_unicode(&self) -> bool
Checks that the current Name data has a Unicode encoding.
Trait Implementations§
impl<'a> Copy for Name<'a>
Auto Trait Implementations§
impl<'a> Freeze for Name<'a>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)