pub struct Trace { /* private fields */ }Expand description
The module backtrace.
Implementations§
Source§impl Trace
impl Trace
Sourcepub fn push_front<D>(&mut self, module: D)where
D: Display,
pub fn push_front<D>(&mut self, module: D)where
D: Display,
Push module to the front.
Sourcepub fn modules(&self) -> Modules<'_> ⓘ
pub fn modules(&self) -> Modules<'_> ⓘ
Get an iterator over all modules in the backtrace.
§Example
let mut trace = Trace::new();
trace.push_back("module 1");
trace.push_back("module 2");
let mut iter = trace.modules();
assert_eq!(iter.next(), Some("module 1"));
assert_eq!(iter.next(), Some("module 2"));
assert_eq!(iter.next(), None);Trait Implementations§
Source§impl<D> FromIterator<D> for Tracewhere
D: Display,
impl<D> FromIterator<D> for Tracewhere
D: Display,
Source§fn from_iter<T: IntoIterator<Item = D>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = D>>(iter: T) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl Freeze for Trace
impl RefUnwindSafe for Trace
impl Send for Trace
impl Sync for Trace
impl Unpin for Trace
impl UnsafeUnpin for Trace
impl UnwindSafe for Trace
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