Struct core_foundation::filedescriptor::CFFileDescriptor
source · pub struct CFFileDescriptor(/* private fields */);
Implementations§
source§impl CFFileDescriptor
impl CFFileDescriptor
pub fn new( fd: RawFd, closeOnInvalidate: bool, callout: CFFileDescriptorCallBack, context: Option<&CFFileDescriptorContext> ) -> Option<CFFileDescriptor>
pub fn context(&self) -> CFFileDescriptorContext
pub fn enable_callbacks(&self, callback_types: CFOptionFlags)
pub fn disable_callbacks(&self, callback_types: CFOptionFlags)
pub fn valid(&self) -> bool
pub fn invalidate(&self)
pub fn to_run_loop_source(&self, order: CFIndex) -> Option<CFRunLoopSource>
Trait Implementations§
source§impl AsRawFd for CFFileDescriptor
impl AsRawFd for CFFileDescriptor
source§impl Clone for CFFileDescriptor
impl Clone for CFFileDescriptor
source§fn clone(&self) -> CFFileDescriptor
fn clone(&self) -> CFFileDescriptor
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Drop for CFFileDescriptor
impl Drop for CFFileDescriptor
source§impl PartialEq for CFFileDescriptor
impl PartialEq for CFFileDescriptor
source§fn eq(&self, other: &CFFileDescriptor) -> bool
fn eq(&self, other: &CFFileDescriptor) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TCFType for CFFileDescriptor
impl TCFType for CFFileDescriptor
§type Ref = *mut __CFFileDescriptor
type Ref = *mut __CFFileDescriptor
The reference type wrapped inside this type.
source§fn as_concrete_TypeRef(&self) -> CFFileDescriptorRef
fn as_concrete_TypeRef(&self) -> CFFileDescriptorRef
Returns the object as its concrete
TypeRef
.source§unsafe fn wrap_under_get_rule(reference: CFFileDescriptorRef) -> Self
unsafe fn wrap_under_get_rule(reference: CFFileDescriptorRef) -> Self
Returns an instance of the object, wrapping the underlying
CFTypeRef
subclass. Use this
when following Core Foundation’s “Get Rule”. The reference count is bumped.source§fn as_CFTypeRef(&self) -> CFTypeRef
fn as_CFTypeRef(&self) -> CFTypeRef
Returns the object as a raw
CFTypeRef
. The reference count is not adjusted.source§unsafe fn wrap_under_create_rule(reference: CFFileDescriptorRef) -> Self
unsafe fn wrap_under_create_rule(reference: CFFileDescriptorRef) -> Self
Returns an instance of the object, wrapping the underlying
CFTypeRef
subclass. Use this
when following Core Foundation’s “Create Rule”. The reference count is not bumped.source§fn as_CFType(&self) -> CFType
fn as_CFType(&self) -> CFType
Returns the object as a wrapped
CFType
. The reference count is incremented by one.source§fn into_CFType(self) -> CFTypewhere
Self: Sized,
fn into_CFType(self) -> CFTypewhere Self: Sized,
Returns the object as a wrapped
CFType
. Consumes self and avoids changing the reference
count.source§fn retain_count(&self) -> CFIndex
fn retain_count(&self) -> CFIndex
Returns the reference count of the object. It is unwise to do anything other than test
whether the return value of this method is greater than zero.
source§fn instance_of<OtherCFType: TCFType>(&self) -> bool
fn instance_of<OtherCFType: TCFType>(&self) -> bool
Returns
true
if this value is an instance of another type.source§impl<'a> ToVoid<CFFileDescriptor> for &'a CFFileDescriptor
impl<'a> ToVoid<CFFileDescriptor> for &'a CFFileDescriptor
source§impl ToVoid<CFFileDescriptor> for CFFileDescriptorRef
impl ToVoid<CFFileDescriptor> for CFFileDescriptorRef
source§impl ToVoid<CFFileDescriptor> for CFFileDescriptor
impl ToVoid<CFFileDescriptor> for CFFileDescriptor
impl ConcreteCFType for CFFileDescriptor
impl Eq for CFFileDescriptor
Auto Trait Implementations§
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