Struct unwind::StackFrameIter
source · pub struct StackFrameIter { /* private fields */ }
Expand description
An iterator over the stack frames on the current task’s call stack,
which works in reverse calling order from the current function
up the call stack to the very first function on the stack,
at which point it will return None
.
This is a lazy iterator: the previous frame in the call stack
is only calculated upon invocation of the next()
method.
This can be used with the FallibleIterator
trait.
Implementations§
source§impl StackFrameIter
impl StackFrameIter
sourcepub fn registers(&self) -> &Registers
pub fn registers(&self) -> &Registers
Returns the array of register values as they existed during the stack frame that is currently being iterated over.
After the next()
is invoked to iterate to a given stack frame,
this function will return the register values for that frame that was just iterated to.
Successive calls to this function will keep returning the same register values
until the next()
method is invoked again.
This is necessary in order to restore the proper register values before jumping to the landing pad (a cleanup function or exception/panic catcher) such that the landing pad function will actually execute properly with the right context.
Trait Implementations§
source§impl Debug for StackFrameIter
impl Debug for StackFrameIter
source§impl FallibleIterator for StackFrameIter
impl FallibleIterator for StackFrameIter
§type Item = StackFrame
type Item = StackFrame
source§fn next(&mut self) -> Result<Option<Self::Item>, Self::Error>
fn next(&mut self) -> Result<Option<Self::Item>, Self::Error>
source§fn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
source§fn count(self) -> Result<usize, Self::Error>where
Self: Sized,
fn count(self) -> Result<usize, Self::Error>where Self: Sized,
source§fn last(self) -> Result<Option<Self::Item>, Self::Error>where
Self: Sized,
fn last(self) -> Result<Option<Self::Item>, Self::Error>where Self: Sized,
source§fn nth(&mut self, n: usize) -> Result<Option<Self::Item>, Self::Error>
fn nth(&mut self, n: usize) -> Result<Option<Self::Item>, Self::Error>
n
th element of the iterator.source§fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where Self: Sized,
source§fn chain<I>(self, it: I) -> Chain<Self, I>where
I: IntoFallibleIterator<Item = Self::Item, Error = Self::Error>,
Self: Sized,
fn chain<I>(self, it: I) -> Chain<Self, I>where I: IntoFallibleIterator<Item = Self::Item, Error = Self::Error>, Self: Sized,
source§fn zip<I>(
self,
o: I
) -> Zip<Self, <I as IntoFallibleIterator>::IntoFallibleIter>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
fn zip<I>( self, o: I ) -> Zip<Self, <I as IntoFallibleIterator>::IntoFallibleIter>where Self: Sized, I: IntoFallibleIterator<Error = Self::Error>,
source§fn map<F, B>(self, f: F) -> Map<Self, F>where
Self: Sized,
F: FnMut(Self::Item) -> Result<B, Self::Error>,
fn map<F, B>(self, f: F) -> Map<Self, F>where Self: Sized, F: FnMut(Self::Item) -> Result<B, Self::Error>,
source§fn for_each<F>(self, f: F) -> Result<(), Self::Error>where
Self: Sized,
F: FnMut(Self::Item) -> Result<(), Self::Error>,
fn for_each<F>(self, f: F) -> Result<(), Self::Error>where Self: Sized, F: FnMut(Self::Item) -> Result<(), Self::Error>,
source§fn filter<F>(self, f: F) -> Filter<Self, F>where
Self: Sized,
F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
fn filter<F>(self, f: F) -> Filter<Self, F>where Self: Sized, F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
source§fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>where
Self: Sized,
F: FnMut(Self::Item) -> Result<Option<B>, Self::Error>,
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>where Self: Sized, F: FnMut(Self::Item) -> Result<Option<B>, Self::Error>,
source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where Self: Sized,
source§fn peekable(self) -> Peekable<Self>where
Self: Sized,
fn peekable(self) -> Peekable<Self>where Self: Sized,
source§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>where
Self: Sized,
P: FnMut(&Self::Item) -> Result<bool, Self::Error>,
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>where Self: Sized, P: FnMut(&Self::Item) -> Result<bool, Self::Error>,
source§fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>where
Self: Sized,
P: FnMut(&Self::Item) -> Result<bool, Self::Error>,
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>where Self: Sized, P: FnMut(&Self::Item) -> Result<bool, Self::Error>,
source§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where Self: Sized,
n
values of this iterator.source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where Self: Sized,
n
values of this
iterator.source§fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>where
Self: Sized,
F: FnMut(&mut St, Self::Item) -> Result<Option<B>, Self::Error>,
fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>where Self: Sized, F: FnMut(&mut St, Self::Item) -> Result<Option<B>, Self::Error>,
source§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where
Self: Sized,
U: IntoFallibleIterator<Error = Self::Error>,
F: FnMut(Self::Item) -> Result<U, Self::Error>,
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where Self: Sized, U: IntoFallibleIterator<Error = Self::Error>, F: FnMut(Self::Item) -> Result<U, Self::Error>,
source§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where Self: Sized,
Ok(None)
. Read moresource§fn inspect<F>(self, f: F) -> Inspect<Self, F>where
Self: Sized,
F: FnMut(&Self::Item) -> Result<(), Self::Error>,
fn inspect<F>(self, f: F) -> Inspect<Self, F>where Self: Sized, F: FnMut(&Self::Item) -> Result<(), Self::Error>,
source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere Self: Sized,
source§fn collect<T>(self) -> Result<T, Self::Error>where
T: FromFallibleIterator<Self::Item>,
Self: Sized,
fn collect<T>(self) -> Result<T, Self::Error>where T: FromFallibleIterator<Self::Item>, Self: Sized,
source§fn partition<B, F>(self, f: F) -> Result<(B, B), Self::Error>where
Self: Sized,
B: Default + Extend<Self::Item>,
F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
fn partition<B, F>(self, f: F) -> Result<(B, B), Self::Error>where Self: Sized, B: Default + Extend<Self::Item>, F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
source§fn fold<B, F>(self, init: B, f: F) -> Result<B, Self::Error>where
Self: Sized,
F: FnMut(B, Self::Item) -> Result<B, Self::Error>,
fn fold<B, F>(self, init: B, f: F) -> Result<B, Self::Error>where Self: Sized, F: FnMut(B, Self::Item) -> Result<B, Self::Error>,
source§fn try_fold<B, E, F>(&mut self, init: B, f: F) -> Result<B, E>where
Self: Sized,
E: From<Self::Error>,
F: FnMut(B, Self::Item) -> Result<B, E>,
fn try_fold<B, E, F>(&mut self, init: B, f: F) -> Result<B, E>where Self: Sized, E: From<Self::Error>, F: FnMut(B, Self::Item) -> Result<B, E>,
source§fn all<F>(&mut self, f: F) -> Result<bool, Self::Error>where
Self: Sized,
F: FnMut(Self::Item) -> Result<bool, Self::Error>,
fn all<F>(&mut self, f: F) -> Result<bool, Self::Error>where Self: Sized, F: FnMut(Self::Item) -> Result<bool, Self::Error>,
source§fn any<F>(&mut self, f: F) -> Result<bool, Self::Error>where
Self: Sized,
F: FnMut(Self::Item) -> Result<bool, Self::Error>,
fn any<F>(&mut self, f: F) -> Result<bool, Self::Error>where Self: Sized, F: FnMut(Self::Item) -> Result<bool, Self::Error>,
source§fn find<F>(&mut self, f: F) -> Result<Option<Self::Item>, Self::Error>where
Self: Sized,
F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
fn find<F>(&mut self, f: F) -> Result<Option<Self::Item>, Self::Error>where Self: Sized, F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
source§fn find_map<B, F>(&mut self, f: F) -> Result<Option<B>, Self::Error>where
Self: Sized,
F: FnMut(Self::Item) -> Result<Option<B>, Self::Error>,
fn find_map<B, F>(&mut self, f: F) -> Result<Option<B>, Self::Error>where Self: Sized, F: FnMut(Self::Item) -> Result<Option<B>, Self::Error>,
None
result.