pub struct CliBackend {
pub cmd: String,
pub args: Vec<String>,
}Expand description
Generic CLI backend — spawns cmd args..., writes a flattened prompt
to its stdin, and streams stdout chunks back. Used unchanged for
claude / gemini / codex; the difference is just cmd + args.
Fields§
§cmd: String§args: Vec<String>Trait Implementations§
Source§impl Backend for CliBackend
impl Backend for CliBackend
fn complete<'life0, 'async_trait>(
&'life0 self,
req: CompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ReplyStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl Clone for CliBackend
impl Clone for CliBackend
Source§fn clone(&self) -> CliBackend
fn clone(&self) -> CliBackend
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CliBackend
impl Debug for CliBackend
Source§impl From<&CliBackendConfig> for CliBackend
impl From<&CliBackendConfig> for CliBackend
Source§fn from(cfg: &CliBackendConfig) -> Self
fn from(cfg: &CliBackendConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CliBackend
impl RefUnwindSafe for CliBackend
impl Send for CliBackend
impl Sync for CliBackend
impl Unpin for CliBackend
impl UnsafeUnpin for CliBackend
impl UnwindSafe for CliBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more