#[repr(C)]pub struct CFRunLoop { /* private fields */ }
Available on crate feature
CFRunLoop
only.Expand description
Implementations§
Source§impl CFRunLoop
impl CFRunLoop
pub fn current() -> Option<CFRetained<CFRunLoop>>
pub fn main() -> Option<CFRetained<CFRunLoop>>
pub fn current_mode(self: &CFRunLoop) -> Option<CFRetained<CFRunLoopMode>>
pub fn all_modes(self: &CFRunLoop) -> Option<CFRetained<CFArray>>
Available on crate feature
CFArray
only.pub fn add_common_mode(self: &CFRunLoop, mode: Option<&CFRunLoopMode>)
pub fn next_timer_fire_date( self: &CFRunLoop, mode: Option<&CFRunLoopMode>, ) -> CFAbsoluteTime
Available on crate feature
CFDate
only.pub fn run()
pub fn run_in_mode( mode: Option<&CFRunLoopMode>, seconds: CFTimeInterval, return_after_source_handled: bool, ) -> CFRunLoopRunResult
Available on crate feature
CFDate
only.pub fn is_waiting(self: &CFRunLoop) -> bool
pub fn wake_up(self: &CFRunLoop)
pub fn stop(self: &CFRunLoop)
pub unsafe fn perform_block( self: &CFRunLoop, mode: Option<&CFType>, block: Option<&DynBlock<dyn Fn()>>, )
Available on crate feature
block2
only.pub fn contains_source( self: &CFRunLoop, source: Option<&CFRunLoopSource>, mode: Option<&CFRunLoopMode>, ) -> bool
pub fn add_source( self: &CFRunLoop, source: Option<&CFRunLoopSource>, mode: Option<&CFRunLoopMode>, )
pub fn remove_source( self: &CFRunLoop, source: Option<&CFRunLoopSource>, mode: Option<&CFRunLoopMode>, )
pub fn contains_observer( self: &CFRunLoop, observer: Option<&CFRunLoopObserver>, mode: Option<&CFRunLoopMode>, ) -> bool
pub fn add_observer( self: &CFRunLoop, observer: Option<&CFRunLoopObserver>, mode: Option<&CFRunLoopMode>, )
pub fn remove_observer( self: &CFRunLoop, observer: Option<&CFRunLoopObserver>, mode: Option<&CFRunLoopMode>, )
pub fn contains_timer( self: &CFRunLoop, timer: Option<&CFRunLoopTimer>, mode: Option<&CFRunLoopMode>, ) -> bool
pub fn add_timer( self: &CFRunLoop, timer: Option<&CFRunLoopTimer>, mode: Option<&CFRunLoopMode>, )
pub fn remove_timer( self: &CFRunLoop, timer: Option<&CFRunLoopTimer>, mode: Option<&CFRunLoopMode>, )
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T: ConcreteType>(&self) -> Option<&T>
pub fn downcast_ref<T: ConcreteType>(&self) -> Option<&T>
Attempt to downcast the type to that of type T
.
This is the reference-variant. Use CFRetained::downcast
if you
want to convert a retained type. See also ConcreteType
for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumber
s, small CFString
s etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX
in that case.
Trait Implementations§
Source§impl ConcreteType for CFRunLoop
impl ConcreteType for CFRunLoop
Source§impl RefEncode for CFRunLoop
impl RefEncode for CFRunLoop
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
Source§impl Type for CFRunLoop
impl Type for CFRunLoop
Source§fn retain(&self) -> CFRetained<Self> ⓘwhere
Self: Sized,
fn retain(&self) -> CFRetained<Self> ⓘwhere
Self: Sized,
Increment the reference count of the receiver. Read more
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
👎Deprecated: this is redundant
Helper for easier transition from the
core-foundation
crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
👎Deprecated: use CFRetained::retain
Helper for easier transition from the
core-foundation
crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
👎Deprecated: this is redundant (CF types deref to CFType)
Helper for easier transition from the
core-foundation
crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
👎Deprecated: use CFRetained::from_raw
Helper for easier transition from the
core-foundation
crate. Read moreimpl Eq for CFRunLoop
Auto Trait Implementations§
impl !Freeze for CFRunLoop
impl !RefUnwindSafe for CFRunLoop
impl !Send for CFRunLoop
impl !Sync for CFRunLoop
impl !Unpin 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