pub struct ResourceRef(/* private fields */);Expand description
A borrowed reference to a Resource.
Implementations§
Source§impl ResourceRef
impl ResourceRef
pub fn device(&self) -> &DeviceRef
pub fn label(&self) -> &str
pub fn set_label(&self, label: &str)
pub fn cpu_cache_mode(&self) -> MTLCPUCacheMode
pub fn storage_mode(&self) -> MTLStorageMode
pub fn set_purgeable_state(&self, state: MTLPurgeableState) -> MTLPurgeableState
Sourcepub fn allocated_size(&self) -> NSUInteger
pub fn allocated_size(&self) -> NSUInteger
Only available on macOS 10.13+ & iOS 10.11+
Sourcepub fn hazard_tracking_mode(&self) -> MTLHazardTrackingMode
pub fn hazard_tracking_mode(&self) -> MTLHazardTrackingMode
Only available on macos(10.15), ios(13.0)
Sourcepub fn resource_options(&self) -> MTLResourceOptions
pub fn resource_options(&self) -> MTLResourceOptions
Only available on macos(10.15), ios(13.0)
Sourcepub fn heap_offset(&self) -> NSUInteger
pub fn heap_offset(&self) -> NSUInteger
Only available on macos(10.15), ios(13.0)
Sourcepub fn make_aliasable(&self)
pub fn make_aliasable(&self)
Only available on macos(10.13), ios(10.0)
Sourcepub fn is_aliasable(&self) -> bool
pub fn is_aliasable(&self) -> bool
Only available on macos(10.13), ios(10.0)
Methods from Deref<Target = NsObjectRef>§
pub fn conforms_to_protocol<T>(&self) -> Result<bool, String>
Trait Implementations§
Source§impl AsMut<ResourceRef> for Resource
impl AsMut<ResourceRef> for Resource
Source§fn as_mut(&mut self) -> &mut ResourceRef
fn as_mut(&mut self) -> &mut ResourceRef
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<ResourceRef> for Resource
impl AsRef<ResourceRef> for Resource
Source§fn as_ref(&self) -> &ResourceRef
fn as_ref(&self) -> &ResourceRef
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<ResourceRef> for Resource
impl Borrow<ResourceRef> for Resource
Source§fn borrow(&self) -> &ResourceRef
fn borrow(&self) -> &ResourceRef
Immutably borrows from an owned value. Read more
Source§impl BorrowMut<ResourceRef> for Resource
impl BorrowMut<ResourceRef> for Resource
Source§fn borrow_mut(&mut self) -> &mut ResourceRef
fn borrow_mut(&mut self) -> &mut ResourceRef
Mutably borrows from an owned value. Read more
Source§impl Debug for ResourceRef
impl Debug for ResourceRef
Source§impl Deref for ResourceRef
impl Deref for ResourceRef
Source§impl ForeignTypeRef for ResourceRef
impl ForeignTypeRef for ResourceRef
Source§type CType = MTLResource
type CType = MTLResource
The raw C type.
Source§unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
Constructs a shared instance of this type from its raw type. Read more
Source§impl Message for ResourceRef
impl Message for ResourceRef
Source§unsafe fn send_message<A, R>(
&self,
sel: Sel,
args: A,
) -> Result<R, MessageError>
unsafe fn send_message<A, R>( &self, sel: Sel, args: A, ) -> Result<R, MessageError>
Sends a message to self with the given selector and arguments. Read more
Source§fn verify_message<A, R>(&self, sel: Sel) -> Result<(), MessageError>
fn verify_message<A, R>(&self, sel: Sel) -> Result<(), MessageError>
Verifies that the argument and return types match the encoding of the
method for the given selector. Read more
Source§impl ToOwned for ResourceRef
impl ToOwned for ResourceRef
impl Send for ResourceRef
impl Sync for ResourceRef
Auto Trait Implementations§
impl Freeze for ResourceRef
impl !RefUnwindSafe for ResourceRef
impl Unpin for ResourceRef
impl UnwindSafe for ResourceRef
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more