pub enum GraphicsCaptureApiError<E> {
FailedToJoinThread,
FailedToInitWinRT,
FailedToCreateDispatcherQueueController,
FailedToShutdownDispatcherQueue,
FailedToSetDispatcherQueueCompletedHandler,
ItemConvertFailed,
DirectXError(Error),
GraphicsCaptureApiError(Error),
NewHandlerError(E),
FrameHandlerError(E),
}展开描述
在初始化和运行 Windows Graphics Capture 流水线时可能发生的错误。
变体§
FailedToJoinThread
工作线程的 join 失败(panic 或操作系统级别的 join 错误)。
FailedToInitWinRT
无法为多线程单元初始化 Windows Runtime。
当 RoInitialize(RO_INIT_MULTITHREADED) 返回 S_FALSE 之外的错误时发生。
FailedToCreateDispatcherQueueController
为消息循环创建调度器队列控制器失败。
FailedToShutdownDispatcherQueue
关闭调度器队列失败。
FailedToSetDispatcherQueueCompletedHandler
注册调度器队列完成处理器失败。
ItemConvertFailed
所提供的项无法转换为 GraphicsCaptureItem。
当传入 crate::settings::Settings 的项调用
[crate::settings::TryIntoCaptureItemWithDetails::try_into_capture_item_with_details]
失败时会发生这种情况。
DirectXError(Error)
底层 Direct3D (D3D11) 错误。
包装了 crate::d3d11::Error。
GraphicsCaptureApiError(Error)
由 Windows Graphics Capture API 包装器产生的错误。
NewHandlerError(E)
通过
GraphicsCaptureApiHandler::new
构造时由用户处理器返回的错误。
FrameHandlerError(E)
在帧处理期间通过
GraphicsCaptureApiHandler::on_frame_arrived
或从
GraphicsCaptureApiHandler::on_closed
由用户处理器返回的错误。
trait 实现§
源代码§impl<E: Clone> Clone for GraphicsCaptureApiError<E>
impl<E: Clone> Clone for GraphicsCaptureApiError<E>
源代码§fn clone(&self) -> GraphicsCaptureApiError<E>
fn clone(&self) -> GraphicsCaptureApiError<E>
返回该值的一个副本。 阅读更多
1.0.0 · 源代码§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. 阅读更多源代码§impl<E: Debug> Debug for GraphicsCaptureApiError<E>
impl<E: Debug> Debug for GraphicsCaptureApiError<E>
源代码§impl<E> Display for GraphicsCaptureApiError<E>where
E: Display,
impl<E> Display for GraphicsCaptureApiError<E>where
E: Display,
源代码§impl<E> Error for GraphicsCaptureApiError<E>
impl<E> Error for GraphicsCaptureApiError<E>
源代码§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. 阅读更多
1.0.0 · 源代码§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
源代码§impl<E> From<Error> for GraphicsCaptureApiError<E>
impl<E> From<Error> for GraphicsCaptureApiError<E>
源代码§impl<E> From<GraphicsCaptureApiError<E>> for CaptureControlError<E>
impl<E> From<GraphicsCaptureApiError<E>> for CaptureControlError<E>
源代码§fn from(source: GraphicsCaptureApiError<E>) -> Self
fn from(source: GraphicsCaptureApiError<E>) -> Self
从输入类型转换为该类型。
源代码§impl<E: PartialEq> PartialEq for GraphicsCaptureApiError<E>
impl<E: PartialEq> PartialEq for GraphicsCaptureApiError<E>
impl<E: Eq> Eq for GraphicsCaptureApiError<E>
impl<E> StructuralPartialEq for GraphicsCaptureApiError<E>
自动 trait 实现§
impl<E> Freeze for GraphicsCaptureApiError<E>where
E: Freeze,
impl<E> RefUnwindSafe for GraphicsCaptureApiError<E>where
E: RefUnwindSafe,
impl<E> Send for GraphicsCaptureApiError<E>where
E: Send,
impl<E> Sync for GraphicsCaptureApiError<E>where
E: Sync,
impl<E> Unpin for GraphicsCaptureApiError<E>where
E: Unpin,
impl<E> UnsafeUnpin for GraphicsCaptureApiError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for GraphicsCaptureApiError<E>where
E: UnwindSafe,
blanket 实现§
源代码§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
源代码§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
从拥有的值可变地借用。 阅读更多
源代码§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
源代码§impl<T> IntoEither for T
impl<T> IntoEither for T
源代码§fn into_either(self, into_left: bool) -> Either<Self, Self>
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>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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. 阅读更多