pub struct StackTrace {
pub language: Language,
pub kind: Option<String>,
pub message: Option<String>,
pub frames: Vec<Frame>,
pub cause: Option<Box<StackTrace>>,
pub cause_kind: CauseKind,
pub omitted_causes: usize,
pub location: Option<Frame>,
}Expand description
A normalised stack trace.
Fields§
§language: LanguageThe source language.
kind: Option<String>The error type (ValueError, java.io.IOException, panic).
message: Option<String>The error message.
frames: Vec<Frame>Frames, most recent call last.
cause: Option<Box<StackTrace>>The error this one came from.
cause_kind: CauseKindHow cause relates to this error.
omitted_causes: usizeCauses below this one that were left out because the chain was longer
than MAX_CAUSES. Rendered as … N more causes.
location: Option<Frame>Where the error was raised, when the trace names it apart from the
frames (a Rust panic’s panicked at location).
Implementations§
Source§impl StackTrace
impl StackTrace
Sourcepub fn chain(&self) -> impl Iterator<Item = &StackTrace>
pub fn chain(&self) -> impl Iterator<Item = &StackTrace>
The traces from this one down its causes.
Sourcepub fn origin(&self) -> Option<&Frame>
pub fn origin(&self) -> Option<&Frame>
The most recent application (non-library) frame, if any: where to look.
Sourcepub fn render_options(&self) -> StackTraceView<'_>
pub fn render_options(&self) -> StackTraceView<'_>
A renderable view with the default options.
Trait Implementations§
Source§impl Clone for StackTrace
impl Clone for StackTrace
Source§impl Debug for StackTrace
impl Debug for StackTrace
Source§impl Drop for StackTrace
Unlinks the cause chain one trace at a time: the derived drop recurses
once per cause and overflows the stack on a long hand-built chain.
impl Drop for StackTrace
Unlinks the cause chain one trace at a time: the derived drop recurses once per cause and overflows the stack on a long hand-built chain.
impl Eq for StackTrace
Source§impl PartialEq for StackTrace
impl PartialEq for StackTrace
Source§impl Renderable for StackTrace
impl Renderable for StackTrace
fn rich_render( &self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment>
Source§fn measure(&self, _console: &Console, options: &ConsoleOptions) -> Measurement
fn measure(&self, _console: &Console, options: &ConsoleOptions) -> Measurement
The
(minimum, maximum) cell width this renderable wants. The default
assumes the renderable fills the available width (e.g. Panel, Table);
Text overrides it with its content width so the top-level print path can
shrink to fit. Port of __rich_measure__ / Measurement.get.Source§fn fit_to_measurement(&self) -> bool
fn fit_to_measurement(&self) -> bool
Whether a top-level
Console::print shrinks this renderable to its
measured width. Upstream renders every top-level renderable at the full
console width, so the default is false; an extension may opt in.impl StructuralPartialEq for StackTrace
Auto Trait Implementations§
impl Freeze for StackTrace
impl RefUnwindSafe for StackTrace
impl Send for StackTrace
impl Sync for StackTrace
impl Unpin for StackTrace
impl UnsafeUnpin for StackTrace
impl UnwindSafe for StackTrace
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.