pub struct DisplaySource<'a> { /* private fields */ }Expand description
A borrowed error together with its optional caller location, intended for diagnostic display.
Errors owned by a crate::Frame have the location captured when that frame was created. Native
std::error::Error::source() values have no location because no caller location was captured for them.
Unlike crate::Frame, this type neither owns the error nor represents relationships in an error tree. This lets
crate::Error::iter_errors_with_locations() provide the same lightweight view for the tree-backed and flattened-chain
representations.
Its normal Display output appends the location when one is available. Alternate formatting
({source:#}) forwards alternate formatting to the underlying error and always omits the location.
Implementations§
Source§impl<'a> DisplaySource<'a>
impl<'a> DisplaySource<'a>
Trait Implementations§
Source§impl<'a> Clone for DisplaySource<'a>
impl<'a> Clone for DisplaySource<'a>
Source§fn clone(&self) -> DisplaySource<'a>
fn clone(&self) -> DisplaySource<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for DisplaySource<'a>
Source§impl<'a> Debug for DisplaySource<'a>
impl<'a> Debug for DisplaySource<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for DisplaySource<'a>
impl<'a> !Send for DisplaySource<'a>
impl<'a> !Sync for DisplaySource<'a>
impl<'a> !UnwindSafe for DisplaySource<'a>
impl<'a> Freeze for DisplaySource<'a>
impl<'a> Unpin for DisplaySource<'a>
impl<'a> UnsafeUnpin for DisplaySource<'a>
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