Skip to main content

Observer

Trait Observer 

Source
pub trait Observer: Send {
    // Provided methods
    fn progress(&mut self, _progress: &Progress) { ... }
    fn diagnostic(&mut self, _diagnostic: &Diagnostic) { ... }
}
Expand description

Receives a run’s events on the run’s thread. Both methods default to doing nothing.

Provided Methods§

Source

fn progress(&mut self, _progress: &Progress)

Source

fn diagnostic(&mut self, _diagnostic: &Diagnostic)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Observer for ()

No events.

Implementors§

Source§

impl<F: FnMut(&Progress) + Send> Observer for F

A closure observes progress only.