pub enum Error {
NoActiveWindow,
NotFound(String),
FailedToConvertWindowsString,
WindowsError(Error),
}展开描述
通过 Window 查询或操作顶级窗口时可能发生的错误。
变体§
NoActiveWindow
调用时不存在前台窗口。
由 Window::foreground 返回。
NotFound(String)
没有窗口匹配提供的标题或子串。
FailedToConvertWindowsString
将 UTF-16 Windows 字符串转换为 String 失败。
WindowsError(Error)
Windows API 调用返回错误。
包装了 windows::core::Error。
trait 实现§
Source§impl Error for Error
impl Error for Error
impl Eq for Error
impl StructuralPartialEq for Error
自动 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 实现§
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
从拥有的值可变地借用。 了解更多
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§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>。
了解更多Source§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>。
了解更多