Skip to main content

StdError

Trait StdError 

1.0.0 · Source
pub trait StdError: Debug + Display {
    // Provided methods
    fn source(&self) -> Option<&(dyn Error + 'static)> { ... }
    fn description(&self) -> &str { ... }
    fn cause(&self) -> Option<&dyn Error> { ... }
    fn provide<'a>(&'a self, request: &mut Request<'a>) { ... }
}
Expand description

Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E>.

Errors must describe themselves through the Display and Debug traits. Error messages are typically concise lowercase sentences without trailing punctuation:

let err = "NaN".parse::<u32>().unwrap_err();
assert_eq!(err.to_string(), "invalid digit found in string");

§Error source

Errors may provide cause information. Error::source() is generally used when errors cross “abstraction boundaries”. If one module must report an error that is caused by an error from a lower-level module, it can allow accessing that error via Error::source(). This makes it possible for the high-level module to provide its own errors while also revealing some of the implementation for debugging.

In error types that wrap an underlying error, the underlying error should be either returned by the outer error’s Error::source(), or rendered by the outer error’s Display implementation, but not both.

§Example

Implementing the Error trait only requires that Debug and Display are implemented too.

use std::error::Error;
use std::fmt;
use std::path::PathBuf;

#[derive(Debug)]
struct ReadConfigError {
    path: PathBuf
}

impl fmt::Display for ReadConfigError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        let path = self.path.display();
        write!(f, "unable to read configuration at {path}")
    }
}

impl Error for ReadConfigError {}

Provided Methods§

1.30.0 · Source

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

Returns the lower-level source of this error, if any.

§Examples
use std::error::Error;
use std::fmt;

#[derive(Debug)]
struct SuperError {
    source: SuperErrorSideKick,
}

impl fmt::Display for SuperError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "SuperError is here!")
    }
}

impl Error for SuperError {
    fn source(&self) -> Option<&(dyn Error + 'static)> {
        Some(&self.source)
    }
}

#[derive(Debug)]
struct SuperErrorSideKick;

impl fmt::Display for SuperErrorSideKick {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "SuperErrorSideKick is here!")
    }
}

impl Error for SuperErrorSideKick {}

fn get_super_error() -> Result<(), SuperError> {
    Err(SuperError { source: SuperErrorSideKick })
}

fn main() {
    match get_super_error() {
        Err(e) => {
            println!("Error: {e}");
            println!("Caused by: {}", e.source().unwrap());
        }
        _ => println!("No error"),
    }
}
1.0.0 · Source

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
if let Err(e) = "xc".parse::<u32>() {
    // Print `e` itself, no need for description().
    eprintln!("Error: {e}");
}
1.0.0 · Source

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

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source

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.

Used in conjunction with Request::provide_value and Request::provide_ref to extract references to member variables from dyn Error trait objects.

§Example
#![feature(error_generic_member_access)]
use core::fmt;
use core::error::{request_ref, Request};

#[derive(Debug)]
enum MyLittleTeaPot {
    Empty,
}

#[derive(Debug)]
struct MyBacktrace {
    // ...
}

impl MyBacktrace {
    fn new() -> MyBacktrace {
        // ...
    }
}

#[derive(Debug)]
struct Error {
    backtrace: MyBacktrace,
}

impl fmt::Display for Error {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "Example Error")
    }
}

impl std::error::Error for Error {
    fn provide<'a>(&'a self, request: &mut Request<'a>) {
        request
            .provide_ref::<MyBacktrace>(&self.backtrace);
    }
}

fn main() {
    let backtrace = MyBacktrace::new();
    let error = Error { backtrace };
    let dyn_error = &error as &dyn std::error::Error;
    let backtrace_ref = request_ref::<MyBacktrace>(dyn_error).unwrap();

    assert!(core::ptr::eq(&error.backtrace, backtrace_ref));
    assert!(request_ref::<MyLittleTeaPot>(dyn_error).is_none());
}
§Delegating Impls

Warning: We recommend implementors avoid delegating implementations of provide to source error implementations.

This method should expose context from the current piece of the source chain only, not from sources that are exposed in the chain of sources. Delegating provide implementations cause the same context to be provided by multiple errors in the chain of sources which can cause unintended duplication of information in error reports or require heuristics to deduplicate.

In other words, the following implementation pattern for provide is discouraged and should not be used for Error types exposed in public APIs to third parties.

struct MyError {
    source: Error,
}

impl std::error::Error for MyError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        Some(&self.source)
    }

    fn provide<'a>(&'a self, request: &mut Request<'a>) {
        self.source.provide(request) // <--- Discouraged
    }
}

Implementations§

Source§

impl dyn Error

1.3.0 · Source

pub fn is<T>(&self) -> bool
where T: Error + 'static,

Returns true if the inner type is the same as T.

1.3.0 · Source

pub fn downcast_ref<T>(&self) -> Option<&T>
where T: Error + 'static,

Returns some reference to the inner value if it is of type T, or None if it isn’t.

1.3.0 · Source

pub fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: Error + 'static,

Returns some mutable reference to the inner value if it is of type T, or None if it isn’t.

Source§

impl dyn Error + Send

1.3.0 · Source

pub fn is<T>(&self) -> bool
where T: Error + 'static,

Forwards to the method defined on the type dyn Error.

1.3.0 · Source

pub fn downcast_ref<T>(&self) -> Option<&T>
where T: Error + 'static,

Forwards to the method defined on the type dyn Error.

1.3.0 · Source

pub fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: Error + 'static,

Forwards to the method defined on the type dyn Error.

Source§

impl dyn Error + Send + Sync

1.3.0 · Source

pub fn is<T>(&self) -> bool
where T: Error + 'static,

Forwards to the method defined on the type dyn Error.

1.3.0 · Source

pub fn downcast_ref<T>(&self) -> Option<&T>
where T: Error + 'static,

Forwards to the method defined on the type dyn Error.

1.3.0 · Source

pub fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: Error + 'static,

Forwards to the method defined on the type dyn Error.

Source§

impl dyn Error

Source

pub fn sources(&self) -> Source<'_>

🔬This is a nightly-only experimental API. (error_iter)

Returns an iterator starting with the current error and continuing with recursively calling Error::source.

If you want to omit the current error and only use its sources, use skip(1).

§Examples
#![feature(error_iter)]
use std::error::Error;
use std::fmt;

#[derive(Debug)]
struct A;

#[derive(Debug)]
struct B(Option<Box<dyn Error + 'static>>);

impl fmt::Display for A {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "A")
    }
}

impl fmt::Display for B {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "B")
    }
}

impl Error for A {}

impl Error for B {
    fn source(&self) -> Option<&(dyn Error + 'static)> {
        self.0.as_ref().map(|e| e.as_ref())
    }
}

let b = B(Some(Box::new(A)));

// let err : Box<Error> = b.into(); // or
let err = &b as &dyn Error;

let mut iter = err.sources();

assert_eq!("B".to_string(), iter.next().unwrap().to_string());
assert_eq!("A".to_string(), iter.next().unwrap().to_string());
assert!(iter.next().is_none());
assert!(iter.next().is_none());
Source§

impl dyn Error

1.3.0 · Source

pub fn downcast<T>(self: Box<dyn Error>) -> Result<Box<T>, Box<dyn Error>>
where T: Error + 'static,

Attempts to downcast the box to a concrete type.

Source§

impl dyn Error + Send

1.3.0 · Source

pub fn downcast<T>( self: Box<dyn Error + Send>, ) -> Result<Box<T>, Box<dyn Error + Send>>
where T: Error + 'static,

Attempts to downcast the box to a concrete type.

Source§

impl dyn Error + Send + Sync

1.3.0 · Source

pub fn downcast<T>( self: Box<dyn Error + Send + Sync>, ) -> Result<Box<T>, Box<dyn Error + Send + Sync>>
where T: Error + 'static,

Attempts to downcast the box to a concrete type.

Trait Implementations§

1.6.0 · Source§

impl<'a> From<&str> for Box<dyn Error + 'a>

Available on non-no_global_oom_handling only.
Source§

fn from(err: &str) -> Box<dyn Error + 'a>

Converts a str into a box of dyn Error.

§Examples
use std::error::Error;

let a_str_error = "a str error";
let a_boxed_error = Box::<dyn Error>::from(a_str_error);
assert!(size_of::<Box<dyn Error>>() == size_of_val(&a_boxed_error))
1.0.0 · Source§

impl<'a> From<&str> for Box<dyn Error + Send + Sync + 'a>

Available on non-no_global_oom_handling only.
Source§

fn from(err: &str) -> Box<dyn Error + Send + Sync + 'a>

Converts a str into a box of dyn Error + Send + Sync.

§Examples
use std::error::Error;

let a_str_error = "a str error";
let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_str_error);
assert!(
    size_of::<Box<dyn Error + Send + Sync>>() == size_of_val(&a_boxed_error))
1.22.0 · Source§

impl<'a, 'b> From<Cow<'b, str>> for Box<dyn Error + 'a>

Available on non-no_global_oom_handling only.
Source§

fn from(err: Cow<'b, str>) -> Box<dyn Error + 'a>

Converts a Cow into a box of dyn Error.

§Examples
use std::error::Error;
use std::borrow::Cow;

let a_cow_str_error = Cow::from("a str error");
let a_boxed_error = Box::<dyn Error>::from(a_cow_str_error);
assert!(size_of::<Box<dyn Error>>() == size_of_val(&a_boxed_error))
1.22.0 · Source§

impl<'a, 'b> From<Cow<'b, str>> for Box<dyn Error + Send + Sync + 'a>

Available on non-no_global_oom_handling only.
Source§

fn from(err: Cow<'b, str>) -> Box<dyn Error + Send + Sync + 'a>

Converts a Cow into a box of dyn Error + Send + Sync.

§Examples
use std::error::Error;
use std::borrow::Cow;

let a_cow_str_error = Cow::from("a str error");
let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_cow_str_error);
assert!(
    size_of::<Box<dyn Error + Send + Sync>>() == size_of_val(&a_boxed_error))
1.0.0 · Source§

impl<'a, E> From<E> for Box<dyn Error + 'a>
where E: Error + 'a,

Available on non-no_global_oom_handling only.
Source§

fn from(err: E) -> Box<dyn Error + 'a>

Converts a type of Error into a box of dyn Error.

§Examples
use std::error::Error;
use std::fmt;

#[derive(Debug)]
struct AnError;

impl fmt::Display for AnError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "An error")
    }
}

impl Error for AnError {}

let an_error = AnError;
assert!(0 == size_of_val(&an_error));
let a_boxed_error = Box::<dyn Error>::from(an_error);
assert!(size_of::<Box<dyn Error>>() == size_of_val(&a_boxed_error))
1.0.0 · Source§

impl<'a, E> From<E> for Box<dyn Error + Send + Sync + 'a>
where E: Error + Send + Sync + 'a,

Available on non-no_global_oom_handling only.
Source§

fn from(err: E) -> Box<dyn Error + Send + Sync + 'a>

Converts a type of Error + Send + Sync into a box of dyn Error + Send + Sync.

§Examples
use std::error::Error;
use std::fmt;

#[derive(Debug)]
struct AnError;

impl fmt::Display for AnError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "An error")
    }
}

impl Error for AnError {}

unsafe impl Send for AnError {}

unsafe impl Sync for AnError {}

let an_error = AnError;
assert!(0 == size_of_val(&an_error));
let a_boxed_error = Box::<dyn Error + Send + Sync>::from(an_error);
assert!(
    size_of::<Box<dyn Error + Send + Sync>>() == size_of_val(&a_boxed_error))
1.6.0 · Source§

impl<'a> From<String> for Box<dyn Error + 'a>

Available on non-no_global_oom_handling only.
Source§

fn from(str_err: String) -> Box<dyn Error + 'a>

Converts a String into a box of dyn Error.

§Examples
use std::error::Error;

let a_string_error = "a string error".to_string();
let a_boxed_error = Box::<dyn Error>::from(a_string_error);
assert!(size_of::<Box<dyn Error>>() == size_of_val(&a_boxed_error))
1.0.0 · Source§

impl<'a> From<String> for Box<dyn Error + Send + Sync + 'a>

Available on non-no_global_oom_handling only.
Source§

fn from(err: String) -> Box<dyn Error + Send + Sync + 'a>

Converts a String into a box of dyn Error + Send + Sync.

§Examples
use std::error::Error;

let a_string_error = "a string error".to_string();
let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_string_error);
assert!(
    size_of::<Box<dyn Error + Send + Sync>>() == size_of_val(&a_boxed_error))

Implementors§

1.65.0 · Source§

impl !Error for &str

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::Error

Source§

impl Error for PollError

Source§

impl Error for RequestAdapterError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::SurfaceError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::hal::DeviceError

Source§

impl Error for PipelineCacheError

Source§

impl Error for PipelineError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::hal::ShaderError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::hal::SurfaceError

Source§

impl Error for HandleError

Available on crate feature std only.
Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::binding_model::BindError

Source§

impl Error for BindGroupLayoutEntryError

Source§

impl Error for BindingZone

Source§

impl Error for CreateBindGroupError

Source§

impl Error for CreateBindGroupLayoutError

Source§

impl Error for CreatePipelineLayoutError

Source§

impl Error for GetBindGroupLayoutError

Source§

impl Error for PushConstantUploadError

Source§

impl Error for AttachmentError

Source§

impl Error for ClearError

Source§

impl Error for ColorAttachmentError

Source§

impl Error for CommandEncoderError

Source§

impl Error for ComputePassErrorInner

Source§

impl Error for CopyError

Source§

impl Error for CreateRenderBundleError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::command::DispatchError

Source§

impl Error for DrawError

Source§

impl Error for ExecutionError

Source§

impl Error for PassErrorScope

Source§

impl Error for QueryError

Source§

impl Error for QueryUseError

Source§

impl Error for RenderCommandError

Source§

impl Error for RenderPassErrorInner

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::command::ResolveError

Source§

impl Error for TransferError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::device::DeviceError

Source§

impl Error for RenderPassCompatibilityError

Source§

impl Error for WaitIdleError

Source§

impl Error for QueueSubmitError

Source§

impl Error for QueueWriteError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::instance::CreateSurfaceError

Source§

impl Error for GetSurfaceSupportError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::instance::RequestDeviceError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::naga::back::glsl::Error

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::naga::back::hlsl::EntryPointError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::naga::back::hlsl::Error

Source§

impl Error for PipelineConstantError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::naga::back::spv::Error

Source§

impl Error for ConstantEvaluatorError

Source§

impl Error for IndexableLengthError

Source§

impl Error for LayoutErrorInner

Source§

impl Error for ResolveArraySizeError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::naga::proc::ResolveError

Source§

impl Error for CallError

Source§

impl Error for ComposeError

Source§

impl Error for ConstExpressionError

Source§

impl Error for ConstantError

Source§

impl Error for Disalignment

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::naga::valid::EntryPointError

Source§

impl Error for ExpressionError

Source§

impl Error for FunctionError

Source§

impl Error for GlobalVariableError

Source§

impl Error for LiteralError

Source§

impl Error for LocalVariableError

Source§

impl Error for OverrideError

Source§

impl Error for PushConstantError

Source§

impl Error for TypeError

Source§

impl Error for ValidationError

Source§

impl Error for VaryingError

Source§

impl Error for WidthError

Source§

impl Error for ColorStateError

Source§

impl Error for CreateComputePipelineError

Source§

impl Error for CreatePipelineCacheError

Source§

impl Error for CreateRenderPipelineError

Source§

impl Error for CreateShaderModuleError

Source§

impl Error for DepthStencilStateError

Source§

impl Error for ImplicitLayoutError

Source§

impl Error for PipelineCacheValidationError

Source§

impl Error for ConfigureSurfaceError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::present::SurfaceError

Source§

impl Error for BuildAccelerationStructureError

Source§

impl Error for CreateBlasError

Source§

impl Error for CreateTlasError

Source§

impl Error for ValidateAsActionsError

Source§

impl Error for BufferAccessError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::resource::CreateBufferError

Source§

impl Error for CreateQuerySetError

Source§

impl Error for CreateSamplerError

Source§

impl Error for CreateTextureError

Source§

impl Error for CreateTextureViewError

Source§

impl Error for DestroyError

Source§

impl Error for TextureDimensionError

Source§

impl Error for TextureViewDestroyError

Source§

impl Error for TextureViewNotRenderableReason

Source§

impl Error for BindingError

Source§

impl Error for FilteringError

Source§

impl Error for InputError

Source§

impl Error for StageError

Source§

impl Error for EncodeError

Source§

impl Error for FileError

1.8.0 · Source§

impl Error for Infallible

1.17.0 · Source§

impl Error for FromBytesWithNulError

1.86.0 · Source§

impl Error for core::slice::GetDisjointMutError

1.0.0 · Source§

impl Error for VarError

1.89.0 · Source§

impl Error for std::fs::TryLockError

1.15.0 · Source§

impl Error for std::sync::mpsc::RecvTimeoutError

1.0.0 · Source§

impl Error for std::sync::mpsc::TryRecvError

Source§

impl Error for LoadingError

Available on crate feature std only.
Source§

impl Error for async_channel::TryRecvError

Available on crate feature std only.
Source§

impl Error for ParseAlphabetError

Available on crate features std only.
Source§

impl Error for DecodeError

Available on crate features std only.
Source§

impl Error for DecodeSliceError

Available on crate features std only.
Source§

impl Error for EncodeSliceError

Available on crate features std only.
Source§

impl Error for ErrorKind

Source§

impl Error for calloop::error::Error

Source§

impl Error for calloop::error::Error

Source§

impl Error for codespan_reporting::files::Error

Source§

impl Error for PopError

Available on crate feature std only.
Source§

impl Error for DlError

Source§

impl Error for gif::encoder::EncodingError

Source§

impl Error for EncodingFormatError

Source§

impl Error for gif::reader::decoder::DecodingError

Source§

impl Error for gpu_alloc::error::AllocationError

Available on crate feature std only.
Source§

impl Error for MapError

Available on crate feature std only.
Source§

impl Error for gpu_descriptor::allocator::AllocationError

Available on crate feature std only.
Source§

impl Error for humantime::date::Error

Source§

impl Error for humantime::duration::Error

Source§

impl Error for ImageError

Source§

impl Error for image::images::flat::Error

Source§

impl Error for indexmap::GetDisjointMutError

Available on crate feature std only.
Source§

impl Error for khronos_egl::egl1_0::Error

Source§

impl Error for libloading::error::Error

Source§

impl Error for CmsError

Source§

impl Error for png::decoder::stream::DecodingError

Source§

impl Error for png::encoder::EncodingError

Source§

impl Error for StartError

Available on crate feature std only.
Source§

impl Error for regex_syntax::error::Error

Available on crate feature std only.
Source§

impl Error for regex::error::Error

Available on crate feature std only.
Source§

impl Error for ron::error::Error

Source§

impl Error for serde_xml_rs::error::Error

Source§

impl Error for slab::GetDisjointMutError

Available on crate feature std only.
Source§

impl Error for smithay_client_toolkit::data_device_manager::data_offer::DataOfferError

Source§

impl Error for smithay_client_toolkit::data_device_manager::data_offer::DataOfferError

Source§

impl Error for smithay_client_toolkit::error::GlobalError

Source§

impl Error for smithay_client_toolkit::error::GlobalError

Source§

impl Error for smithay_client_toolkit::seat::SeatError

Source§

impl Error for smithay_client_toolkit::seat::SeatError

Source§

impl Error for smithay_client_toolkit::seat::pointer::PointerThemeError

Source§

impl Error for smithay_client_toolkit::seat::pointer::PointerThemeError

Source§

impl Error for smithay_client_toolkit::shm::CreatePoolError

Source§

impl Error for smithay_client_toolkit::shm::CreatePoolError

Source§

impl Error for smithay_client_toolkit::shm::multi::PoolError

Source§

impl Error for smithay_client_toolkit::shm::multi::PoolError

Source§

impl Error for smithay_client_toolkit::shm::slot::ActivateSlotError

Source§

impl Error for smithay_client_toolkit::shm::slot::ActivateSlotError

Source§

impl Error for smithay_client_toolkit::shm::slot::CreateBufferError

Source§

impl Error for smithay_client_toolkit::shm::slot::CreateBufferError

Source§

impl Error for FaceParsingError

Available on crate feature std only.
Source§

impl Error for WaylandError

Source§

impl Error for InitError

Source§

impl Error for wayland_client::conn::ConnectError

Source§

impl Error for wayland_client::DispatchError

Source§

impl Error for wayland_client::globals::BindError

Source§

impl Error for wayland_client::globals::GlobalError

Source§

impl Error for LzwError

Available on crate feature std only.
Source§

impl Error for BadImage

Source§

impl Error for EventLoopError

Source§

impl Error for ExternalError

Source§

impl Error for BadIcon

Source§

impl Error for x11_clipboard::error::Error

Source§

impl Error for x11rb_protocol::errors::ConnectError

Available on crate feature std only.
Source§

impl Error for DisplayParsingError

Available on crate feature std only.
Source§

impl Error for x11rb_protocol::errors::ParseError

Available on crate feature std only.
Source§

impl Error for ConnectionError

Source§

impl Error for LibxcbLoadError

Available on crate feature dl-libxcb only.
Source§

impl Error for ReplyError

Source§

impl Error for ReplyOrIdError

Source§

impl Error for EmitterError

Source§

impl Error for DecodeErrors

Available on crate feature std only.
Source§

impl Error for !

Source§

impl Error for InstanceError

Source§

impl Error for BufferAsyncError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::CreateSurfaceError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::RequestDeviceError

Source§

impl Error for BindingTypeMaxCountError

Source§

impl Error for LateMinBufferBindingSizeMismatch

Source§

impl Error for ComputePassError

Source§

impl Error for RenderBundleError

Source§

impl Error for RenderPassError

Source§

impl Error for DeviceMismatch

Source§

impl Error for MissingDownlevelFlags

Source§

impl Error for MissingFeatures

Source§

impl Error for ContextError

Source§

impl Error for MultiError

Source§

impl Error for FailedLimit

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::naga::front::wgsl::ParseError

Source§

impl Error for hexga_engine::graphics::gpu::wgpu::wgc::naga::proc::LayoutError

Source§

impl Error for MissingSpecialType

Source§

impl Error for DestroyedResourceError

Source§

impl Error for InvalidResourceError

Source§

impl Error for MissingBufferUsageError

Source§

impl Error for MissingTextureUsageError

Source§

impl Error for IoError

Source§

impl Error for UnorderedKeyError

1.57.0 · Source§

impl Error for alloc::collections::TryReserveError

1.58.0 · Source§

impl Error for FromVecWithNulError

1.7.0 · Source§

impl Error for IntoStringError

1.0.0 · Source§

impl Error for NulError

1.0.0 · Source§

impl Error for FromUtf8Error

1.0.0 · Source§

impl Error for FromUtf16Error

1.28.0 · Source§

impl Error for core::alloc::layout::LayoutError

Source§

impl Error for AllocError

1.34.0 · Source§

impl Error for TryFromSliceError

1.13.0 · Source§

impl Error for BorrowError

1.13.0 · Source§

impl Error for BorrowMutError

1.34.0 · Source§

impl Error for CharTryFromError

1.20.0 · Source§

impl Error for ParseCharError

1.9.0 · Source§

impl Error for DecodeUtf16Error

1.59.0 · Source§

impl Error for TryFromCharError

1.69.0 · Source§

impl Error for FromBytesUntilNulError

1.11.0 · Source§

impl Error for core::fmt::Error

1.4.0 · Source§

impl Error for AddrParseError

1.0.0 · Source§

impl Error for ParseFloatError

1.0.0 · Source§

impl Error for ParseIntError

1.34.0 · Source§

impl Error for TryFromIntError

1.0.0 · Source§

impl Error for ParseBoolError

1.0.0 · Source§

impl Error for Utf8Error

1.66.0 · Source§

impl Error for TryFromFloatSecsError

1.0.0 · Source§

impl Error for JoinPathsError

1.56.0 · Source§

impl Error for WriterPanicked

1.0.0 · Source§

impl Error for std::io::error::Error

Source§

impl Error for NormalizeError

1.7.0 · Source§

impl Error for StripPrefixError

Source§

impl Error for ExitStatusError

1.0.0 · Source§

impl Error for std::sync::mpsc::RecvError

1.26.0 · Source§

impl Error for AccessError

1.8.0 · Source§

impl Error for SystemTimeError

Source§

impl Error for InvalidFont

Available on crate feature std only.
Source§

impl Error for aho_corasick::util::error::BuildError

Available on crate feature std only.
Source§

impl Error for aho_corasick::util::error::MatchError

Available on crate feature std only.
Source§

impl Error for aho_corasick::util::primitives::PatternIDError

Available on crate feature std only.
Source§

impl Error for aho_corasick::util::primitives::StateIDError

Available on crate feature std only.
Source§

impl Error for Result

Available on crate feature std only.
Source§

impl Error for CStrTooLargeForStaticArray

Available on crate feature std only.
Source§

impl Error for async_channel::RecvError

Available on crate feature std only.
Source§

impl Error for bitflags::parser::ParseError

Available on crate feature std only.
Source§

impl Error for calloop::sources::channel::ChannelError

Source§

impl Error for calloop::sources::channel::ChannelError

Source§

impl Error for calloop::sources::ping::PingError

Source§

impl Error for calloop::sources::ping::PingError

Source§

impl Error for cursor_icon::ParseError

Available on crate feature std only.
Source§

impl Error for CompressError

Source§

impl Error for DecompressError

Source§

impl Error for DecodingFormatError

Source§

impl Error for ParseHexfError

Source§

impl Error for image::error::DecodingError

Source§

impl Error for image::error::EncodingError

Source§

impl Error for LimitError

Source§

impl Error for ParameterError

Source§

impl Error for TryFromExtendedColorError

Source§

impl Error for UnsupportedError

Source§

impl Error for indexmap::TryReserveError

Available on crate feature std only.
Source§

impl Error for ParseLevelError

Available on crate feature std only.
Source§

impl Error for SetLoggerError

Available on crate feature std only.
Source§

impl Error for ThreadPoolBuildError

Source§

impl Error for regex_automata::dfa::onepass::BuildError

Available on crate feature std only.
Source§

impl Error for regex_automata::hybrid::error::BuildError

Available on crate feature std only.
Source§

impl Error for CacheError

Available on crate feature std only.
Source§

impl Error for regex_automata::meta::error::BuildError

Available on crate feature std only.
Source§

impl Error for regex_automata::nfa::thompson::error::BuildError

Available on crate feature std only.
Source§

impl Error for GroupInfoError

Available on crate feature std only.
Source§

impl Error for UnicodeWordBoundaryError

Available on crate feature std only.
Source§

impl Error for regex_automata::util::primitives::PatternIDError

Available on crate feature std only.
Source§

impl Error for SmallIndexError

Available on crate feature std only.
Source§

impl Error for regex_automata::util::primitives::StateIDError

Available on crate feature std only.
Source§

impl Error for regex_automata::util::search::MatchError

Available on crate feature std only.
Source§

impl Error for PatternSetInsertError

Available on crate feature std only.
Source§

impl Error for DeserializeError

Available on crate feature std only.
Source§

impl Error for SerializeError

Available on crate feature std only.
Source§

impl Error for regex_syntax::ast::Error

Available on crate feature std only.
Source§

impl Error for regex_syntax::hir::Error

Available on crate feature std only.
Source§

impl Error for CaseFoldError

Available on crate feature std only.
Source§

impl Error for UnicodeWordError

Available on crate feature std only.
Source§

impl Error for SpannedError

Source§

impl Error for rustix::backend::io::errno::Errno

Available on crate feature std or error_in_core only.
Source§

impl Error for rustix::backend::io::errno::Errno

Available on crate feature std only.
Source§

impl Error for serde_json::error::Error

Source§

impl Error for smithay_client_toolkit::shell::wlr_layer::UnknownLayer

Source§

impl Error for smithay_client_toolkit::shell::wlr_layer::UnknownLayer

Source§

impl Error for ColorChoiceParseError

Source§

impl Error for ParseColorError

Source§

impl Error for ProtocolError

Source§

impl Error for WEnumError

Source§

impl Error for wayland_backend::types::client::InvalidId

Source§

impl Error for NoWaylandLib

Source§

impl Error for wayland_backend::types::server::InvalidId

Source§

impl Error for NotSupportedError

Source§

impl Error for OsError

Source§

impl Error for OpenError

Source§

impl Error for IdsExhausted

Available on crate feature std only.
Source§

impl Error for xml::reader::error::Error

Source§

impl Error for hexga_engine::math::serde::de::value::Error

Available on crate feature std only.
Source§

impl<'a, K, V> Error for alloc::collections::btree::map::entry::OccupiedError<'a, K, V>
where K: Debug + Ord, V: Debug,

Source§

impl<'a, K, V, A> Error for std::collections::hash::map::OccupiedError<'a, K, V, A>
where K: Debug, V: Debug, A: Allocator,

1.51.0 · Source§

impl<'a, T> Error for &'a T
where T: Error + ?Sized,

Source§

impl<A, S, V> Error for ConvertError<A, S, V>
where A: Display + Debug, S: Display + Debug, V: Display + Debug,

Available on zerocopy_core_error_1_81_0 or crate feature std only.
Source§

impl<E> Error for hexga_engine::graphics::gpu::wgpu::wgc::naga::error::ShaderError<E>
where ShaderError<E>: Display, E: Error + 'static,

Source§

impl<E> Error for WithSpan<E>
where E: Error,

1.8.0 · Source§

impl<E> Error for Box<E>
where E: Error,

Source§

impl<K> Error for smithay_client_toolkit::shm::multi::BufferSlot<K>
where BufferSlot<K>: Debug + Display,

Source§

impl<K> Error for smithay_client_toolkit::shm::multi::BufferSlot<K>
where BufferSlot<K>: Debug + Display,

Source§

impl<L> Error for LoadError<L>
where L: Error + 'static,

Available on crate feature dynamic only.
Source§

impl<Src, Dst> Error for AlignmentError<Src, Dst>
where Src: Deref, Dst: KnownLayout + ?Sized,

Available on zerocopy_core_error_1_81_0 or crate feature std only.
Source§

impl<Src, Dst> Error for SizeError<Src, Dst>
where Src: Deref, Dst: KnownLayout + ?Sized,

Available on zerocopy_core_error_1_81_0 or crate feature std only.
Source§

impl<Src, Dst> Error for ValidityError<Src, Dst>
where Dst: KnownLayout + TryFromBytes + ?Sized,

Available on zerocopy_core_error_1_81_0 or crate feature std only.
Source§

impl<T> Error for SendTimeoutError<T>

1.0.0 · Source§

impl<T> Error for std::sync::mpsc::TrySendError<T>

Source§

impl<T> Error for std::sync::oneshot::RecvTimeoutError<T>

Source§

impl<T> Error for std::sync::oneshot::TryRecvError<T>

1.0.0 · Source§

impl<T> Error for std::sync::poison::TryLockError<T>

Source§

impl<T> Error for async_channel::TrySendError<T>

Available on crate feature std only.
Source§

impl<T> Error for PushError<T>
where T: Debug,

Available on crate feature std only.
Source§

impl<T> Error for CapacityFullError<T>
where T: Any,

Available on crate feature std only.

Requires features="std".

Source§

impl<T> Error for ThinBox<T>
where T: Error + ?Sized,

1.52.0 · Source§

impl<T> Error for Arc<T>
where T: Error + ?Sized,

1.0.0 · Source§

impl<T> Error for std::sync::mpsc::SendError<T>

1.0.0 · Source§

impl<T> Error for PoisonError<T>

Source§

impl<T> Error for async_channel::SendError<T>

Available on crate feature std only.
Source§

impl<T> Error for calloop::error::InsertError<T>

Source§

impl<T> Error for calloop::error::InsertError<T>

Source§

impl<T> Error for ForcePushError<T>
where T: Debug,

Available on crate feature std only.
Source§

impl<T> Error for EventLoopClosed<T>
where T: Debug,

1.0.0 · Source§

impl<W> Error for IntoInnerError<W>
where W: Send + Debug,