跳到主要内容

CaptureControl

搜索

结构体 CaptureControl 

源代码
pub struct CaptureControl<T: GraphicsCaptureApiHandler + Send + 'static, E> { /* private fields */ }
展开描述

用于控制捕获会话

实现§

源代码§

impl<T: GraphicsCaptureApiHandler + Send + 'static, E> CaptureControl<T, E>

源代码

pub const fn new( thread_handle: JoinHandle<Result<(), GraphicsCaptureApiError<E>>>, halt_handle: Arc<AtomicBool>, callback: Arc<Mutex<T>>, ) -> Self

构造一个新的 CaptureControl

源代码

pub fn is_finished(&self) -> bool

检查捕获线程是否已结束。

源代码

pub fn into_thread_handle( self, ) -> JoinHandle<Result<(), GraphicsCaptureApiError<E>>>

获取捕获线程的 join 句柄。

源代码

pub fn halt_handle(&self) -> Arc<AtomicBool>

获取用于暂停捕获线程的 halt 句柄。

源代码

pub fn callback(&self) -> Arc<Mutex<T>>

获取用于直接调用结构体方法的回调结构体。

源代码

pub fn wait(self) -> Result<(), CaptureControlError<E>>

等待捕获线程停止。

§Errors
源代码

pub fn stop(self) -> Result<(), CaptureControlError<E>>

优雅地请求捕获线程停止,并等待其完成。

This posts a WM_QUIT to the capture thread and joins it.

§Errors

自动 trait 实现§

§

impl<T, E> Freeze for CaptureControl<T, E>

§

impl<T, E> !RefUnwindSafe for CaptureControl<T, E>

§

impl<T, E> Send for CaptureControl<T, E>

§

impl<T, E> Sync for CaptureControl<T, E>

§

impl<T, E> Unpin for CaptureControl<T, E>

§

impl<T, E> UnsafeUnpin for CaptureControl<T, E>

§

impl<T, E> !UnwindSafe for CaptureControl<T, E>

blanket 实现§

源代码§

impl<T> Any for T
where T: 'static + ?Sized,

源代码§

fn type_id(&self) -> TypeId

获取 selfTypeId阅读更多
源代码§

impl<T> Borrow<T> for T
where T: ?Sized,

源代码§

fn borrow(&self) -> &T

从拥有的值不可变地借用。 阅读更多
源代码§

impl<T> BorrowMut<T> for T
where T: ?Sized,

源代码§

fn borrow_mut(&mut self) -> &mut T

从拥有的值可变地借用。 阅读更多
源代码§

impl<T> From<T> for T

源代码§

fn from(t: T) -> T

原样返回参数。

源代码§

impl<T, U> Into<U> for T
where U: From<T>,

源代码§

fn into(self) -> U

调用 U::from(self)

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

源代码§

impl<T> IntoEither for T

源代码§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. 阅读更多
源代码§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. 阅读更多
源代码§

impl<T> Pointable for T

源代码§

const ALIGN: usize

指针的对齐方式。
源代码§

type Init = T

初始化器的类型。
源代码§

unsafe fn init(init: <T as Pointable>::Init) -> usize

使用给定的初始化器初始化内存。 阅读更多
源代码§

unsafe fn deref<'a>(ptr: usize) -> &'a T

解引用给定的指针。 阅读更多
源代码§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

可变地解引用给定的指针。 阅读更多
源代码§

unsafe fn drop(ptr: usize)

释放给定指针指向的对象。 阅读更多
源代码§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

源代码§

type Error = Infallible

在转换出错时返回的类型。
源代码§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行转换。
源代码§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

源代码§

type Error = <U as TryFrom<T>>::Error

在转换出错时返回的类型。
源代码§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

执行转换。