pub enum Error {
InvalidSize,
InvalidTitleBarSize,
UnsupportedFormat,
ImageEncoderError(ImageEncoderError),
IoError(Error),
WindowsError(Error),
}展开描述
使用捕获的帧和缓冲区时可能发生的错误。
变体§
InvalidSize
裁剪矩形无效(在任一轴上 start >= end)。
InvalidTitleBarSize
配置的标题栏高度无效(大于或等于帧高度)。
UnsupportedFormat
当前的 ColorFormat 无法保存为图像。
ImageEncoderError(ImageEncoderError)
图像编码失败。
IoError(Error)
将图像写入磁盘时发生了 I/O 错误。
包裹了 std::io::Error。
WindowsError(Error)
Windows API 调用失败。
包裹了 windows::core::Error。
trait 实现§
源码§impl From<ImageEncoderError> for Error
impl From<ImageEncoderError> for Error
源码§fn from(source: ImageEncoderError) -> Self
fn from(source: ImageEncoderError) -> Self
从输入类型转换为此类型。
自动 trait 实现§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket 实现§
源码§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>
当
into_left 为 true 时,将 self 转换为
Left 变体的
Either<Self, Self>;
否则将其转换为
Right 变体的
Either<Self, Self>。 了解更多源码§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
当
into_left(&self) 返回 true 时,将 self 转换为
Left 变体的
Either<Self, Self>;
否则将其转换为
Right 变体的
Either<Self, Self>。 了解更多