agde::event

Struct Unwinder

source
pub struct Unwinder<'a> { /* private fields */ }
Expand description

Unwinds the stack of stored events to get the local data to a previous state.

Has nothing to do with unwinding of the program’s stack in a panic!.

Implementations§

source§

impl<'a> Unwinder<'a>

source

pub fn sections<'b>( &'b self, modern_resource_name: &'b str, ) -> Option<impl Iterator<Item = &Difference> + 'b>

Get an iterator over the [Difference]s to modern_resource_name.

Returns None if modern_resource_name was destroyed/created during the events we’re tracking.

source

pub fn events(&self) -> impl DoubleEndedIterator<Item = &Event> + '_

Get an iterator over the events stored in this unwinder. The first item is the oldest one. The last is the most recent.

Useful it you want to get res