[−][src]Struct native_windows_gui::RawResource
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
impl RefUnwindSafe for RawResource
impl !Send for RawResource
impl !Sync for RawResource
impl Unpin for RawResource
impl UnwindSafe for RawResource
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,