Expand description
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
.
Wide(&'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.
Implementations
Trait Implementations
sourceimpl<'a> From<ResourceType> for Name<'a>
impl<'a> From<ResourceType> for Name<'a>
sourcefn from(resource_type: ResourceType) -> Name<'a>
fn from(resource_type: ResourceType) -> Name<'a>
Converts to this type from the input type.
impl<'a> Copy for Name<'a>
impl<'a> Eq for Name<'a>
impl<'a> StructuralEq for Name<'a>
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more