#[repr(C)]pub struct CFFileDescriptor { /* private fields */ }
Available on crate feature
CFFileDescriptor
only.Expand description
Implementations§
Source§impl CFFileDescriptor
impl CFFileDescriptor
pub unsafe fn new( allocator: Option<&CFAllocator>, fd: CFFileDescriptorNativeDescriptor, close_on_invalidate: bool, callout: CFFileDescriptorCallBack, context: *const CFFileDescriptorContext, ) -> Option<CFRetained<CFFileDescriptor>>
pub fn native_descriptor( self: &CFFileDescriptor, ) -> CFFileDescriptorNativeDescriptor
pub unsafe fn context( self: &CFFileDescriptor, context: *mut CFFileDescriptorContext, )
pub fn enable_call_backs( self: &CFFileDescriptor, call_back_types: CFOptionFlags, )
pub fn disable_call_backs( self: &CFFileDescriptor, call_back_types: CFOptionFlags, )
pub fn invalidate(self: &CFFileDescriptor)
pub fn is_valid(self: &CFFileDescriptor) -> bool
pub fn new_run_loop_source( allocator: Option<&CFAllocator>, f: Option<&CFFileDescriptor>, order: CFIndex, ) -> Option<CFRetained<CFRunLoopSource>>
Available on crate feature
CFRunLoop
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 AsRawFd for CFFileDescriptor
Available on Unix only.
impl AsRawFd for CFFileDescriptor
Available on Unix only.
Source§impl AsRef<AnyObject> for CFFileDescriptor
impl AsRef<AnyObject> for CFFileDescriptor
Source§impl AsRef<CFFileDescriptor> for CFFileDescriptor
impl AsRef<CFFileDescriptor> for CFFileDescriptor
Source§impl AsRef<CFType> for CFFileDescriptor
impl AsRef<CFType> for CFFileDescriptor
Source§impl Borrow<AnyObject> for CFFileDescriptor
impl Borrow<AnyObject> for CFFileDescriptor
Source§impl Borrow<CFType> for CFFileDescriptor
impl Borrow<CFType> for CFFileDescriptor
Source§impl ConcreteType for CFFileDescriptor
impl ConcreteType for CFFileDescriptor
Source§impl Debug for CFFileDescriptor
impl Debug for CFFileDescriptor
Source§impl Deref for CFFileDescriptor
impl Deref for CFFileDescriptor
Source§impl Hash for CFFileDescriptor
impl Hash for CFFileDescriptor
Source§impl Message for CFFileDescriptor
impl Message for CFFileDescriptor
Source§impl PartialEq for CFFileDescriptor
impl PartialEq for CFFileDescriptor
Source§impl RefEncode for CFFileDescriptor
impl RefEncode for CFFileDescriptor
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 CFFileDescriptor
impl Type for CFFileDescriptor
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 CFFileDescriptor
Auto Trait Implementations§
impl !Freeze for CFFileDescriptor
impl !RefUnwindSafe for CFFileDescriptor
impl !Send for CFFileDescriptor
impl !Sync for CFFileDescriptor
impl !Unpin for CFFileDescriptor
impl !UnwindSafe for CFFileDescriptor
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