pub trait SampleCallback: Send + Sync {
// Required method
fn on_sample(&self, sample: ReceivedSample);
}Expand description
Callback-based sample receiver
Alternative to polling - receive samples via callback.
Required Methods§
Sourcefn on_sample(&self, sample: ReceivedSample)
fn on_sample(&self, sample: ReceivedSample)
Called when a new sample is received