pub struct DASession { /* private fields */ }DASession only.Expand description
Type of a reference to DASession instances.
See also Apple’s documentation
Implementations§
Source§impl DASession
impl DASession
Sourcepub unsafe fn new(
allocator: Option<&CFAllocator>,
) -> Option<CFRetained<DASession>>
pub unsafe fn new( allocator: Option<&CFAllocator>, ) -> Option<CFRetained<DASession>>
Creates a new session.
Returns: A reference to a new DASession.
The caller of this function receives a reference to the returned object. The caller also implicitly retains the object and is responsible for releasing it.
Sourcepub unsafe fn schedule_with_run_loop(
&self,
run_loop: &CFRunLoop,
run_loop_mode: &CFString,
)
pub unsafe fn schedule_with_run_loop( &self, run_loop: &CFRunLoop, run_loop_mode: &CFString, )
Schedules the session on a run loop.
Parameter session: The session which is being scheduled.
Parameter runLoop: The run loop on which the session should be scheduled.
Parameter runLoopMode: The run loop mode in which the session should be scheduled.
§Safety
run_loop possibly has additional threading requirements.
Sourcepub unsafe fn unschedule_from_run_loop(
&self,
run_loop: &CFRunLoop,
run_loop_mode: &CFString,
)
pub unsafe fn unschedule_from_run_loop( &self, run_loop: &CFRunLoop, run_loop_mode: &CFString, )
Unschedules the session from a run loop.
Parameter session: The session which is being unscheduled.
Parameter runLoop: The run loop on which the session is scheduled.
Parameter runLoopMode: The run loop mode in which the session is scheduled.
§Safety
run_loop possibly has additional threading requirements.
Sourcepub unsafe fn set_dispatch_queue(&self, queue: Option<&DispatchQueue>)
Available on crate feature dispatch2 only.
pub unsafe fn set_dispatch_queue(&self, queue: Option<&DispatchQueue>)
dispatch2 only.Schedules the session on a dispatch queue.
Parameter session: The session which is being scheduled.
Parameter queue: The dispatch queue on which the session should be scheduled. Pass NULL to unschedule.
§Safety
queue possibly has additional threading requirements.
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
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 CFNumbers, small CFStrings 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 DASession
impl ConcreteType for DASession
Source§impl RefEncode for DASession
impl RefEncode for DASession
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for DASession
impl Type for DASession
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
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,
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
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,
core-foundation crate. Read more