pub struct CaptureError { /* private fields */ }Expand description
A canonical error type shared by all Capture implementations.
Every driver crate maps its domain-specific error into this type via
From<DomainError> impls, so that &mut dyn Capture<Error = CaptureError>
works as a uniform interchange type.
Domain errors (WaylandCaptureError, X11CaptureError, …) remain public
for consumers who prefer rich, typed error matching on concrete methods.
Implementations§
Source§impl CaptureError
impl CaptureError
Sourcepub fn new(kind: CaptureErrorKind, msg: impl Into<String>) -> CaptureError
pub fn new(kind: CaptureErrorKind, msg: impl Into<String>) -> CaptureError
Create a new capture error with the given kind and message.
Sourcepub fn with_source(
self,
e: impl Into<Box<dyn Error + Send + Sync>>,
) -> CaptureError
pub fn with_source( self, e: impl Into<Box<dyn Error + Send + Sync>>, ) -> CaptureError
Attach a chained source to this error.
Sourcepub fn kind(&self) -> CaptureErrorKind
pub fn kind(&self) -> CaptureErrorKind
The high-level category of this error.
Trait Implementations§
Source§impl Debug for CaptureError
impl Debug for CaptureError
Source§impl Display for CaptureError
impl Display for CaptureError
Source§impl Error for CaptureError
impl Error for CaptureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<WgpuCaptureError> for CaptureError
impl From<WgpuCaptureError> for CaptureError
Source§fn from(e: WgpuCaptureError) -> Self
fn from(e: WgpuCaptureError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CaptureError
impl !RefUnwindSafe for CaptureError
impl Send for CaptureError
impl Sync for CaptureError
impl Unpin for CaptureError
impl UnsafeUnpin for CaptureError
impl !UnwindSafe for CaptureError
Blanket Implementations§
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
Mutably borrows from an owned value. Read more