[][src]Struct native_windows_gui::RawResource

pub struct RawResource { /* fields omitted */ }

Represents a raw handle to a embed resource. Manipulating raw resources is inherently unsafe. RawResources are loaded using EmbedResource::raw and EmbedResource::raw_str

In order to access the raw resource data use as_mut_ptr() or as_mut_slice() and cast the pointer to your data type.

Implementations

impl RawResource[src]

pub fn handle(&self) -> HRSRC[src]

Returns the system handle for the resource

pub fn data_handle(&self) -> HGLOBAL[src]

Returns the system handle for the resource data

pub fn resource_type(&self) -> RawResourceType[src]

Returns the resource type set during texture loading

pub fn len(&self) -> usize[src]

Returns the size in bytes of the resource

pub unsafe fn as_mut_ptr(&mut self) -> *mut c_void[src]

Return a const pointer to the resource.

pub unsafe fn as_mut_slice(&self) -> &mut [u8][src]

Return the resource data as a byte slice. This is equivalent to using slice::from_raw_parts_mut

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.