Skip to main content

RunObserver

Trait RunObserver 

Source
pub trait RunObserver {
    // Required methods
    fn on_folder_cleaned(&mut self, size: u64) -> Option<String>;
    fn on_run_complete(&mut self, total: u64) -> Option<String>;
}

Required Methods§

Source

fn on_folder_cleaned(&mut self, size: u64) -> Option<String>

Called after a folder is successfully cleaned. Returns an optional hint string (e.g. “🏆 new highscore!”) to display inline.

Source

fn on_run_complete(&mut self, total: u64) -> Option<String>

Called after the entire run completes. Returns an optional string with medal ASCII art to display.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§