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 screencapturekit::dispatch_queue::{DispatchQueue, DispatchQoS};
let queue = DispatchQueue::new("com.myapp.capture", DispatchQoS::UserInteractive);Implementations§
Source§impl DispatchQueue
impl DispatchQueue
Sourcepub fn new(label: &str, qos: DispatchQoS) -> Self
pub fn new(label: &str, qos: DispatchQoS) -> Self
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 screencapturekit::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§
Source§impl Debug for DispatchQueue
impl Debug for DispatchQueue
Source§impl Display for DispatchQueue
impl Display for DispatchQueue
Source§impl Drop for DispatchQueue
impl Drop 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 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