pub trait CommandCollector {
// Required method
fn invoke(
&mut self,
cmd: &str,
components_to_stop: Arc<AtomicUsize>,
) -> (SkimItemReceiver, Sender<i32>);
}Required Methods§
Sourcefn invoke(
&mut self,
cmd: &str,
components_to_stop: Arc<AtomicUsize>,
) -> (SkimItemReceiver, Sender<i32>)
fn invoke( &mut self, cmd: &str, components_to_stop: Arc<AtomicUsize>, ) -> (SkimItemReceiver, Sender<i32>)
execute the cmd and produce a
- skim item producer
- a channel sender, any message send would mean to terminate the
cmdprocess (for now).
Internally, the command collector may start several threads(components), the collector
should add 1 on every thread creation and sub 1 on thread termination. reader would use
this information to determine whether the collector had stopped or not.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".