Skip to main content

DroidTarget

Struct DroidTarget 

Source
pub struct DroidTarget;

Trait Implementations§

Source§

impl Target for DroidTarget

Source§

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

Source§

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

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 detect_paths(&self, home: &Path) -> Vec<PathBuf>

Source§

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

Source§

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

Source§

fn hook_format_for(&self, _stdin: &str) -> Option<&dyn HookFormat>

The format that answers THIS envelope. Most harnesses send one hook event, so it is hook_format. Codex sends PreToolUse and PermissionRequest to the same command and expects a different answer to each, so it picks by the event the envelope names.
Source§

fn hook_formats(&self) -> Vec<&dyn HookFormat>

Every format hook_format_for can return, so the contract guards that need no envelope walk all of them and a second event’s format cannot ship unchecked. The foreign-tool guard is driven by sample_envelope and reaches only the format that envelope routes to; Codex’s PermissionRequest tool filter has its own test in codex.rs.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.