pub struct CFRunLoop(/* private fields */);Expand description
Safe wrapper around a retained Core Foundation CFRunLoop reference.
Implementations§
Source§impl CFRunLoop
impl CFRunLoop
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Adopts a +1 retained CFRunLoop pointer and returns None for null.
§Safety
A non-null ptr must be a live CFRunLoop pointer of the exact dynamic type carrying one retain transferred to this wrapper. The caller must not release or separately adopt that transferred retain.
Sourcepub unsafe fn from_raw_borrowed(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw_borrowed(ptr: *mut c_void) -> Option<Self>
Retains a +0 borrowed CFRunLoop pointer and returns an owned wrapper.
§Safety
A non-null ptr must be a live CFRunLoop pointer of the exact dynamic type for the duration of the retain call.
Sourcepub const fn as_ptr(&self) -> *mut c_void
pub const fn as_ptr(&self) -> *mut c_void
Borrows the raw +0 Core Foundation pointer while self remains alive.
Sourcepub fn into_cf_type(self) -> CFType
pub fn into_cf_type(self) -> CFType
Consumes this wrapper and returns the erased CFType.
Source§impl CFRunLoop
impl CFRunLoop
Sourcepub fn run_in_default_mode(
&self,
duration: Duration,
return_after_source_handled: bool,
) -> CFRunLoopRunResult
pub fn run_in_default_mode( &self, duration: Duration, return_after_source_handled: bool, ) -> CFRunLoopRunResult
Run the current thread’s run loop in the default mode for duration.
Trait Implementations§
impl Eq for CFRunLoop
impl StructuralPartialEq for CFRunLoop
Auto Trait Implementations§
impl !Send for CFRunLoop
impl !Sync for CFRunLoop
impl Freeze for CFRunLoop
impl RefUnwindSafe for CFRunLoop
impl Unpin for CFRunLoop
impl UnsafeUnpin for CFRunLoop
impl UnwindSafe for CFRunLoop
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