pub struct Frame {
pub source: Box<dyn StdError + Send + Sync + 'static>,
pub location: &'static Location<'static>,
}Expand description
A single layer of error context.
Contains the source error that caused this context layer, along with the location where the context was added. Created automatically by the conversion functions when an error occurs.
§Creation
Frame is typically created via From<T> where T can be
converted to Box<dyn Error + Send + Sync>. The location is captured
using #[track_caller].
Fields§
§source: Box<dyn StdError + Send + Sync + 'static>The underlying error that caused this context.
location: &'static Location<'static>The location where this context was attached.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Frame
impl !RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl !UnwindSafe for Frame
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