Skip to main content

Target

Trait Target 

Source
pub trait Target: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn display_name(&self) -> &'static str;
    fn detect_paths(&self, home: &Path) -> Vec<PathBuf>;
    fn install(&self, home: &Path) -> Result<InstallOutcome, String>;

    // Provided methods
    fn shell_tool_name(&self) -> &'static str { ... }
    fn hook_format(&self) -> Option<&dyn HookFormat> { ... }
}

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn display_name(&self) -> &'static str

Source

fn detect_paths(&self, home: &Path) -> Vec<PathBuf>

Source

fn install(&self, home: &Path) -> Result<InstallOutcome, String>

Provided Methods§

Source

fn shell_tool_name(&self) -> &'static str

The harness’s SHELL tool — the only tool this hook should decide about. Droid’s is Execute, Gemini’s run_shell_command; most are Bash. Defaults to Bash, the common case.

Source

fn hook_format(&self) -> Option<&dyn HookFormat>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§