pub struct RawResource { /* private fields */ }
Expand description

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

Returns the system handle for the resource

Returns the system handle for the resource data

Returns the resource type set during texture loading

Returns the size in bytes of the resource

Return a const pointer to the resource.

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

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 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.