Skip to main content

PurgeRunner

Type Alias PurgeRunner 

Source
pub type PurgeRunner = Arc<dyn Fn(&PurgeOrder, &Progress) -> Result<(), String> + Send + Sync>;
Expand description

What a purge actually is, handed in so this module does not have to know.

Takes the order and a Progress to report through, and returns Ok when the account is empty. The real one is crate::account_purge::purge_account.

It reports through a handle rather than returning a summary because a purge of a large account runs for minutes and a console is polling the whole time: a return value can only be read once the walk is over, which is precisely when nobody needs it any more.

Aliased Typeยง

pub struct PurgeRunner { /* private fields */ }