[−][src]Struct vignette::LibunwindUnwinder
An Unwinder walks one stack and collects frames.
An unwinder should be created, then passed the context to unwind and finally one can retrieve the frames.
Creation should be done outside the suspend_and_resume_thread call!
Implementations
impl LibunwindUnwinder
[src]
pub fn new(max_frames: usize) -> Self
[src]
Creates a new Unwinder.
This sample will hold upto max_frames frames. The collection begins from the bottom-most function on the stack, so once the limit is reached, top frames are dropped.
This is NOT safe to use within suspend_and_resume_thread.
Trait Implementations
impl<'_> Unwinder<&'_ mut ucontext_t> for LibunwindUnwinder
[src]
fn unwind(self, context: &mut ucontext_t) -> Result<Sample, i32>
[src]
The length of the vector is the actual collected frames (<= max_frames).
This IS safe to use within suspend_and_resume_thread.
TODO: Right now if stepping fails, this whole function fails, but we may want to return the frames we have. We also probably want another state to indicate we had more frames than capacity, so users can report some kind of stats.
Auto Trait Implementations
impl RefUnwindSafe for LibunwindUnwinder
impl Send for LibunwindUnwinder
impl Sync for LibunwindUnwinder
impl Unpin for LibunwindUnwinder
impl UnwindSafe for LibunwindUnwinder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,