跳转到主要内容

Error

搜索

枚举 Error 

源码
pub enum Error {
    WindowsError(Error),
    Canceled,
}
展开描述

显示或与 Graphics Capture Picker 交互时可能发生的错误。

变体§

§

WindowsError(Error)

底层 Windows API 调用返回的错误。

§

Canceled

用户取消了选择器(未选择任何项目)。

trait 实现§

源码§

impl Clone for Error

源码§

fn clone(&self) -> Error

返回该值的副本。 了解更多
1.0.0 · 源码§

fn clone_from(&mut self, source: &Self)

source 执行复制赋值。 了解更多
源码§

impl Debug for Error

源码§

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

使用给定的格式化器格式化该值。 了解更多
源码§

impl Display for Error

源码§

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

使用给定的格式化器格式化该值。 了解更多
源码§

impl Error for Error

源码§

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

如果存在,返回该错误的更低层来源。 了解更多
1.0.0 · 源码§

fn description(&self) -> &str

👎自 1.42.0 起已弃用:使用 Display 实现或 to_string()
1.0.0 · 源码§

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

👎自 1.33.0 起已弃用:被 Error::source 取代,后者支持 downcasting
源码§

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

🔬这是 nightly-only 实验性 API(error_generic_member_access)。
提供基于类型的访问,用于错误报告的上下文。 了解更多
源码§

impl From<Error> for Error

源码§

fn from(source: Error) -> Self

从输入类型转换为此类型。
源码§

impl PartialEq for Error

源码§

fn eq(&self, other: &Error) -> bool

测试 selfother 的值是否相等,由 == 使用。
1.0.0 · 源码§

fn ne(&self, other: &Rhs) -> bool

测试 !=。默认实现几乍总足够的, 除非有非常充分的理由,否则不应被重写。
源码§

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 实现§

源码§

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> CloneToUninit for T
where T: Clone,

源码§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 了解更多
源码§

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)

也就是说,此转换由 From<T> for U 的实现决定。

源码§

impl<T> IntoEither for T

源码§

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

into_lefttrue 时,将 self 转换为 Left 变体的 Either<Self, Self>; 否则将其转换为 Right 变体的 Either<Self, Self>了解更多
源码§

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

into_left(&self) 返回 true 时,将 self 转换为 Left 变体的 Either<Self, Self>; 否则将其转换为 Right 变体的 Either<Self, Self>了解更多
源码§

impl<T> Pointable for T

源码§

const ALIGN: usize

指针的对齐方式。
源码§

type Init = T

用于初始化的类型。
源码§

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

使用给定的初始化器初始化 a。 了解更多
源码§

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> ToOwned for T
where T: Clone,

源码§

type Owned = T

获得所有权后得到的类型。
源码§

fn to_owned(&self) -> T

从借用的数据创建拥有的数据,通常通过克隆。 了解更多
源码§

fn clone_into(&self, target: &mut T)

使用借用的数据替换拥有的数据,通常通过克隆。 了解更多
源码§

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>

执行转换。