ToolRuntime

Trait ToolRuntime 

Source
pub trait ToolRuntime {
    // Required methods
    fn is_available(&self) -> impl Future<Output = VxResult<bool>> + Send;
    fn get_version(
        &self,
    ) -> impl Future<Output = VxResult<Option<String>>> + Send;
    fn get_path(&self) -> impl Future<Output = VxResult<Option<PathBuf>>> + Send;
    fn execute(
        &self,
        args: &[String],
    ) -> impl Future<Output = VxResult<i32>> + Send;
}
Expand description

Standard tool runtime interface

Required Methods§

Source

fn is_available(&self) -> impl Future<Output = VxResult<bool>> + Send

Check if the tool is available

Source

fn get_version(&self) -> impl Future<Output = VxResult<Option<String>>> + Send

Get installed version

Source

fn get_path(&self) -> impl Future<Output = VxResult<Option<PathBuf>>> + Send

Get tool installation path

Source

fn execute(&self, args: &[String]) -> impl Future<Output = VxResult<i32>> + Send

Execute the tool with arguments

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§