[][src]Enum pelite::resources::Name

pub enum Name<'a> {
    Id(u32),
    WideStr(&'a [u16]),
    Str(&'a str),
}

Represents a resource name.

Variants

Id(u32)

Resource ID.

Technically allows u32 ids, but some Windows APIs will be unable to use resources with an id which isn't u16.

WideStr(&'a [u16])

UTF-16 named resource.

Str(&'a str)

UTF-8 named resource.

This variant is used when accepting user input and will be interpreted liberally when compared against other names: When prefixed with '#' the string is parsed as a u32 and compared to resource ids. Otherwise compares against wide strings by doing an unicode aware case sensitive comparison.

Methods

impl<'a> Name<'a>[src]

Predefined resource name constants.

pub const MANIFEST: Name<'a>[src]

pub const VERSION: Name<'a>[src]

pub const GROUP_ICON: Name<'a>[src]

pub const GROUP_CURSOR: Name<'a>[src]

Trait Implementations

impl<'a> Eq for Name<'a>[src]

impl<'a> Clone for Name<'a>[src]

impl<'_> PartialEq<Name<'_>> for Name<'_>[src]

impl<'_> PartialEq<str> for Name<'_>[src]

impl<'a> From<ResourceType> for Name<'a>[src]

impl<'a> From<u16> for Name<'a>[src]

impl<'a> From<&'a [u16]> for Name<'a>[src]

impl<'a> From<&'a str> for Name<'a>[src]

impl<'a> Copy for Name<'a>[src]

impl<'a> Debug for Name<'a>[src]

impl<'_> Display for Name<'_>[src]

impl<'a> Serialize for Name<'a>[src]

Auto Trait Implementations

impl<'a> Sync for Name<'a>

impl<'a> Send for Name<'a>

impl<'a> Unpin for Name<'a>

impl<'a> UnwindSafe for Name<'a>

impl<'a> RefUnwindSafe for Name<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]