Skip to main content

Fx

Struct Fx 

Source
pub struct Fx<'a> {
    pub driver_target: PathBuf,
    pub adapter_target: Option<PathBuf>,
    pub editor: &'a dyn Fn(&Path) -> Result<()>,
    pub tool_stdin: &'a mut dyn Read,
    pub tool_stdout: &'a mut dyn Write,
    pub tool_stderr: &'a mut dyn Write,
    pub stop: &'a AtomicBool,
    pub tool_injection: Option<&'a dyn ToolInjection>,
}
Expand description

The binding’s injections (ARCH §3.4 “Process effects stay at the binding”). Every process-global or terminal effect a verb needs is a field here, supplied by the binding — the library reaches for none of its own.

Fields§

§driver_target: PathBuf

The re-entry path for every seam that goes back through the front door: the detached litany advance launch and the §6 successor execve (§2.11), the §3.3 tool resolver’s third hop (<driver_target> tool <name>), and the dispatch / message built-ins’ own re-entry. ARCH §2.11: “the driver target is injected at the binding, not resolved by name” — the exec binding resolves it once via std::env::current_exe, a linked host names its own re-exec target or a PATH-resolved litany. The library resolves none of its own.

§adapter_target: Option<PathBuf>

The provider-adapter target (ARCH §4.4), injected the same way as Self::driver_target: the library resolves no binary of its own, the binding names it. None — the exec binding’s default — leaves today’s resolution intact (the models.yaml adapter: override, else bz on PATH, §4.2). An embedding host that re-execs itself as the adapter names its own target here; like an explicit override, a named target skips the load-time version guard and the in-band MessageStart.v handshake governs (§4.4).

§editor: &'a dyn Fn(&Path) -> Result<()>

The litany config $EDITOR hand-off (§2.2) — the interactive spawn the exec binding supplies as cli::edit_in_editor.

§tool_stdin: &'a mut dyn Read

The litany tool stdin (§3.3 tool_use.input JSON).

§tool_stdout: &'a mut dyn Write

The litany tool stdout (§3.3 raw result bytes).

§tool_stderr: &'a mut dyn Write

The litany tool stderr (§3.3 stderr-concat contract).

§stop: &'a AtomicBool

The executor’s SIGTERM flag (§2.9 step 3), the driver verbs’ Deps::stop. The exec binding wires prelude::stop_flag after prelude::install_stop_handler.

§tool_injection: Option<&'a dyn ToolInjection>

The binding’s tool injection (ARCH §3.3 Host-injected tools), injected like Self::driver_target, and its one choice of execution pipeline: None (the exec binding) spawns every tool through the §3.3 three hops; a host supplying one has its ToolInjection::tools declared and permitted on every request and its ToolInjection::route answering every invocation, with no resolution behind it. ToolInjection, DESIGN_TOOL_INJECTION §3.4.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Fx<'a>

§

impl<'a> !Send for Fx<'a>

§

impl<'a> !Sync for Fx<'a>

§

impl<'a> !UnwindSafe for Fx<'a>

§

impl<'a> Freeze for Fx<'a>

§

impl<'a> Unpin for Fx<'a>

§

impl<'a> UnsafeUnpin for Fx<'a>

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, <T as TryFrom<U>>::Error>

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.