pub struct Name<'a> {
    pub platform_id: PlatformId,
    pub encoding_id: u16,
    pub language_id: u16,
    pub name_id: u16,
    pub name: &'a [u8],
}
Expand description

Fields

platform_id: PlatformId

A platform ID.

encoding_id: u16

A platform-specific encoding ID.

language_id: u16

A language ID.

name_id: u16

A Name ID.

A predefined list of ID’s can be found in the name_id module.

name: &'a [u8]

A raw name data.

Can be in any encoding. Can be empty.

Implementations

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

Checks that the current Name data has a Unicode encoding.

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

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

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

Uses borrowed data to replace owned data, usually by cloning. 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.