mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-10-02 23:36:11 +00:00
Touch up documentation on Error struct
This commit is contained in:
parent
73c7283505
commit
a8ce6e44ec
12
src/error.rs
12
src/error.rs
@ -11,14 +11,14 @@ use std::backtrace::{Backtrace, BacktraceStatus};
|
|||||||
|
|
||||||
/// The `Error` type, a wrapper around a dynamic error type.
|
/// The `Error` type, a wrapper around a dynamic error type.
|
||||||
///
|
///
|
||||||
/// `Error` functions a lot like `Box<dyn std::error::Error>`, with these
|
/// `Error` works a lot like `Box<dyn std::error::Error>`, but with these
|
||||||
/// differences:
|
/// differences:
|
||||||
///
|
///
|
||||||
/// - `Error` requires that the error is `Send`, `Sync`, and `'static`
|
/// - `Error` requires that the error is `Send`, `Sync`, and `'static`.
|
||||||
/// - `Error` guarantees that a backtrace will exist, even if the error type
|
/// - `Error` guarantees that a backtrace is available, even if the underlying
|
||||||
/// did not provide one
|
/// error type does not provide one.
|
||||||
/// - `Error` is represented as a narrow pointer - exactly one word in size,
|
/// - `Error` is represented as a narrow pointer — exactly one word in
|
||||||
/// instead of two.
|
/// size instead of two.
|
||||||
pub struct Error {
|
pub struct Error {
|
||||||
inner: Box<ErrorImpl<()>>,
|
inner: Box<ErrorImpl<()>>,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user