#[repr(C)]pub struct CFRunLoopTimer { /* private fields */ }
Available on crate feature
CFRunLoop
only.Expand description
Implementations§
Source§impl CFRunLoopTimer
impl CFRunLoopTimer
pub unsafe fn new( allocator: Option<&CFAllocator>, fire_date: CFAbsoluteTime, interval: CFTimeInterval, flags: CFOptionFlags, order: CFIndex, callout: CFRunLoopTimerCallBack, context: *mut CFRunLoopTimerContext, ) -> Option<CFRetained<CFRunLoopTimer>>
Available on crate feature
CFDate
only.pub unsafe fn with_handler( allocator: Option<&CFAllocator>, fire_date: CFAbsoluteTime, interval: CFTimeInterval, flags: CFOptionFlags, order: CFIndex, block: Option<&DynBlock<dyn Fn(*mut CFRunLoopTimer)>>, ) -> Option<CFRetained<CFRunLoopTimer>>
Available on crate features
CFDate
and block2
only.pub fn next_fire_date(self: &CFRunLoopTimer) -> CFAbsoluteTime
Available on crate feature
CFDate
only.pub fn set_next_fire_date(self: &CFRunLoopTimer, fire_date: CFAbsoluteTime)
Available on crate feature
CFDate
only.pub fn interval(self: &CFRunLoopTimer) -> CFTimeInterval
Available on crate feature
CFDate
only.pub fn does_repeat(self: &CFRunLoopTimer) -> bool
pub fn order(self: &CFRunLoopTimer) -> CFIndex
pub fn invalidate(self: &CFRunLoopTimer)
pub fn is_valid(self: &CFRunLoopTimer) -> bool
pub unsafe fn context( self: &CFRunLoopTimer, context: *mut CFRunLoopTimerContext, )
pub fn tolerance(self: &CFRunLoopTimer) -> CFTimeInterval
Available on crate feature
CFDate
only.pub unsafe fn set_tolerance(self: &CFRunLoopTimer, tolerance: CFTimeInterval)
Available on crate feature
CFDate
only.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 AsRef<AnyObject> for CFRunLoopTimer
impl AsRef<AnyObject> for CFRunLoopTimer
Source§impl AsRef<CFRunLoopTimer> for CFRunLoopTimer
impl AsRef<CFRunLoopTimer> for CFRunLoopTimer
Source§impl AsRef<CFType> for CFRunLoopTimer
impl AsRef<CFType> for CFRunLoopTimer
Source§impl Borrow<AnyObject> for CFRunLoopTimer
impl Borrow<AnyObject> for CFRunLoopTimer
Source§impl Borrow<CFType> for CFRunLoopTimer
impl Borrow<CFType> for CFRunLoopTimer
Source§impl ConcreteType for CFRunLoopTimer
impl ConcreteType for CFRunLoopTimer
Source§impl Debug for CFRunLoopTimer
impl Debug for CFRunLoopTimer
Source§impl Deref for CFRunLoopTimer
impl Deref for CFRunLoopTimer
Source§impl Hash for CFRunLoopTimer
impl Hash for CFRunLoopTimer
Source§impl Message for CFRunLoopTimer
impl Message for CFRunLoopTimer
Source§impl PartialEq for CFRunLoopTimer
impl PartialEq for CFRunLoopTimer
Source§impl RefEncode for CFRunLoopTimer
impl RefEncode for CFRunLoopTimer
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 CFRunLoopTimer
impl Type for CFRunLoopTimer
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 CFRunLoopTimer
Auto Trait Implementations§
impl !Freeze for CFRunLoopTimer
impl !RefUnwindSafe for CFRunLoopTimer
impl !Send for CFRunLoopTimer
impl !Sync for CFRunLoopTimer
impl !Unpin for CFRunLoopTimer
impl !UnwindSafe for CFRunLoopTimer
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