1 2 3 4 5 6 7 8 9 10 11 12 13 14
use crate::errors::ProtoError;
use std::path::Path;
#[async_trait::async_trait]
pub trait Executable<'tool>: Send + Sync {
    /// Find the absolute file path to the tool's binary that will be executed.
    /// This happens after a tool has been downloaded and installed.
    async fn find_bin_path(&mut self) -> Result<(), ProtoError> {
        Ok(())
    }
    /// Return an absolute file path to the executable binary for the tool.
    fn get_bin_path(&self) -> Result<&Path, ProtoError>;
}