Struct windows_capture::capture::CaptureControl
source · pub struct CaptureControl<T: WindowsCaptureHandler + Send + 'static> { /* private fields */ }Expand description
Struct Used To Control Capture Thread
Implementations§
source§impl<T: WindowsCaptureHandler + Send + 'static> CaptureControl<T>
impl<T: WindowsCaptureHandler + Send + 'static> CaptureControl<T>
sourcepub fn new(
thread_handle: JoinHandle<Result<(), Box<dyn Error + Send + Sync>>>,
halt_handle: Arc<AtomicBool>,
callback: Arc<Mutex<T>>
) -> Self
pub fn new( thread_handle: JoinHandle<Result<(), Box<dyn Error + Send + Sync>>>, halt_handle: Arc<AtomicBool>, callback: Arc<Mutex<T>> ) -> Self
Create A New Capture Control Struct
sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Check To See If Capture Thread Is Finished
sourcepub fn into_thread_handle(
self
) -> JoinHandle<Result<(), Box<dyn Error + Send + Sync>>>
pub fn into_thread_handle( self ) -> JoinHandle<Result<(), Box<dyn Error + Send + Sync>>>
Get The Halt Handle Used To Pause The Capture Thread
sourcepub fn halt_handle(&self) -> Arc<AtomicBool>
pub fn halt_handle(&self) -> Arc<AtomicBool>
Get The Halt Handle Used To Pause The Capture Thread
sourcepub fn callback(&self) -> Arc<Mutex<T>>
pub fn callback(&self) -> Arc<Mutex<T>>
Get The Callback Struct Used To Call Struct Methods Directly
Auto Trait Implementations§
impl<T> !RefUnwindSafe for CaptureControl<T>
impl<T> Send for CaptureControl<T>
impl<T> Sync for CaptureControl<T>
impl<T> Unpin for CaptureControl<T>
impl<T> !UnwindSafe for CaptureControl<T>
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