Struct DispatchQueue
pub struct DispatchQueue { /* private fields */ }Expand description
A wrapper around GCD DispatchQueue
This allows you to provide a custom dispatch queue for stream output handling instead of using the default queue.
§Example
use apple_cf::dispatch_queue::{DispatchQueue, DispatchQoS};
let queue = DispatchQueue::new("com.myapp.capture", DispatchQoS::UserInteractive);Implementations§
§impl DispatchQueue
impl DispatchQueue
pub fn new(label: &str, qos: DispatchQoS) -> DispatchQueue
pub fn new(label: &str, qos: DispatchQoS) -> DispatchQueue
Creates a new dispatch queue with the specified label and QoS
§Arguments
label- A string label for the queue (e.g., “com.myapp.capture”)qos- The quality of service level for the queue
§Examples
use apple_cf::dispatch_queue::{DispatchQueue, DispatchQoS};
let queue = DispatchQueue::new("com.myapp.capture", DispatchQoS::UserInteractive);
// Use the queue with SCStream's add_output_handler_with_queue§Panics
Panics if the label contains null bytes or if queue creation fails
Trait Implementations§
§impl Clone for DispatchQueue
impl Clone for DispatchQueue
§fn clone(&self) -> DispatchQueue
fn clone(&self) -> DispatchQueue
Returns a duplicate 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 more§impl Debug for DispatchQueue
impl Debug for DispatchQueue
§impl Display for DispatchQueue
impl Display for DispatchQueue
impl Send for DispatchQueue
impl Sync for DispatchQueue
Auto Trait Implementations§
impl Freeze for DispatchQueue
impl RefUnwindSafe for DispatchQueue
impl Unpin for DispatchQueue
impl UnsafeUnpin for DispatchQueue
impl UnwindSafe for DispatchQueue
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