#[repr(C)]pub struct MTLResourceID { /* private fields */ }
MTLTypes
only.Expand description
Handle of the GPU resource suitable for storing in an Argument Buffer
A MTLResourceID represents a specific GPU resource, mutating this handle is undefined unless the mutation results in the value equalling an already existing handle of the same resource type.
See also Apple’s documentation
Implementations§
Source§impl MTLResourceID
impl MTLResourceID
Sourcepub const unsafe fn from_raw(id: u64) -> Self
pub const unsafe fn from_raw(id: u64) -> Self
Construct a MTLResourceID
from an ID previously gotten via to_raw
.
§Safety
The documentation for MTLResourceID
says:
A MTLResourceID represents a specific GPU resource, mutating this handle is undefined unless the mutation results in the value equalling an already existing handle of the same resource type.
So we’ve tentatively marked this method as unsafe
, with the safety
requirement that the ID must be valid, i.e. have previously come from
to_raw
or similar.
If you disagree with this assessment, feel free to open an issue!
Trait Implementations§
Source§impl Clone for MTLResourceID
impl Clone for MTLResourceID
Source§fn clone(&self) -> MTLResourceID
fn clone(&self) -> MTLResourceID
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more