跳到主要内容

CaptureControlError

搜索

枚举 CaptureControlError 

源代码
pub enum CaptureControlError<E> {
    FailedToJoinThread,
    ThreadHandleIsTaken,
    FailedToPostThreadMessage,
    StoppedHandlerError(E),
    GraphicsCaptureApiError(GraphicsCaptureApiError<E>),
}
展开描述

通过 CaptureControl 控制运行中的捕获会话时可能发生的错误。

此错误包装了来自 Windows Graphics Capture 流水线的底层错误,以及 启动/停止后台捕获线程时的线程控制失败。

变体§

§

FailedToJoinThread

后台捕获线程的 join 失败(panic 或操作系统级别的 join 错误)。

如果内部线程 panic 或无法被 join,则由 CaptureControl::waitCaptureControl::stop 返回。

§

ThreadHandleIsTaken

std::thread::JoinHandle 已经被从结构体中取出(例如通过调用 CaptureControl::into_thread_handle),因此操作无法继续。

§

FailedToPostThreadMessage

无法向捕获线程发送 WM_QUIT 消息以请求关闭。

这可能发生在线程已不再存活或 Windows 拒绝该消息的情况下。

§

StoppedHandlerError(E)

用户提供的处理器在捕获停止后返回了错误。

此变体携带处理器的错误类型。

§

GraphicsCaptureApiError(GraphicsCaptureApiError<E>)

来自图形捕获流水线的底层错误。

包装了 GraphicsCaptureApiError

trait 实现§

源代码§

impl<E: Debug> Debug for CaptureControlError<E>

源代码§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化器格式化该值。 阅读更多
源代码§

impl<E> Display for CaptureControlError<E>

源代码§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

使用给定的格式化器格式化该值。 阅读更多
源代码§

impl<E> Error for CaptureControlError<E>
where GraphicsCaptureApiError<E>: Error + 'static, Self: Debug + Display,

源代码§

fn source(&self) -> Option<&(dyn Error + 'static)>

返回此错误的更底层来源(若有)。 阅读更多
1.0.0 · 源代码§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · 源代码§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
源代码§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. 阅读更多
源代码§

impl<E> From<GraphicsCaptureApiError<E>> for CaptureControlError<E>

源代码§

fn from(source: GraphicsCaptureApiError<E>) -> Self

从输入类型转换为该类型。

自动 trait 实现§

§

impl<E> Freeze for CaptureControlError<E>
where E: Freeze,

§

impl<E> RefUnwindSafe for CaptureControlError<E>
where E: RefUnwindSafe,

§

impl<E> Send for CaptureControlError<E>
where E: Send,

§

impl<E> Sync for CaptureControlError<E>
where E: Sync,

§

impl<E> Unpin for CaptureControlError<E>
where E: Unpin,

§

impl<E> UnsafeUnpin for CaptureControlError<E>
where E: UnsafeUnpin,

§

impl<E> UnwindSafe for CaptureControlError<E>
where E: UnwindSafe,

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 的实现方式。

源代码§

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> ToString for T
where T: Display + ?Sized,

源代码§

fn to_string(&self) -> String

将给定的值转换为 String阅读更多
源代码§

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>

执行转换。