pub struct Frame { /* private fields */ }Expand description
A frame in the exception tree.
Implementations§
Source§impl Frame
impl Frame
Source§impl Frame
Navigation
impl Frame
Navigation
Sourcepub fn probable_cause(&self) -> Option<&Frame>
pub fn probable_cause(&self) -> Option<&Frame>
Find the best possible cause:
- in a linear chain of a single error each, it’s the last-most child frame
- in trees, find the deepest-possible frame that has the most leafs as children
Return None if there are no children.
Sourcepub fn iter_frames(&self) -> impl Iterator<Item = &Frame> + '_
pub fn iter_frames(&self) -> impl Iterator<Item = &Frame> + '_
Iterate over all frames in breadth-first order. The first frame is this instance, followed by all of its children.
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 !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