pub struct SharedEvent(/* private fields */);Expand description
A cross-process synchronization primitive.
C++ equivalent: MTL::SharedEvent
Implementations§
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a SharedEvent from a raw pointer.
§Safety
The pointer must be a valid Metal shared event object.
Sourcepub fn set_label(&self, label: &str)
pub fn set_label(&self, label: &str)
Set the label.
C++ equivalent: void setLabel(const NS::String*)
Sourcepub fn signaled_value(&self) -> u64
pub fn signaled_value(&self) -> u64
Get the current signaled value.
C++ equivalent: uint64_t signaledValue() const
Sourcepub fn set_signaled_value(&self, value: u64)
pub fn set_signaled_value(&self, value: u64)
Set the signaled value.
C++ equivalent: void setSignaledValue(uint64_t)
Create a handle for sharing across processes.
C++ equivalent: SharedEventHandle* newSharedEventHandle()
Trait Implementations§
Source§fn as_mut_ptr(&self) -> *mut c_void
fn as_mut_ptr(&self) -> *mut c_void
Get the raw mutable pointer to the Objective-C object.
Source§fn retain(&self) -> Selfwhere
Self: Clone,
fn retain(&self) -> Selfwhere
Self: Clone,
Retain the object, incrementing its reference count. Read more
Source§fn autorelease(&self) -> Selfwhere
Self: Clone,
fn autorelease(&self) -> Selfwhere
Self: Clone,
Autorelease the object. Read more
Source§fn retain_count(&self) -> usize
fn retain_count(&self) -> usize
Get the retain count of the object. Read more
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more