pub struct SubprocessBridge { /* private fields */ }Expand description
Subprocess-based bridge implementation
Implementations§
Source§impl SubprocessBridge
impl SubprocessBridge
Sourcepub fn new(config: AiBridgeConfig) -> Result<Self>
pub fn new(config: AiBridgeConfig) -> Result<Self>
Create a new subprocess bridge
Sourcepub fn config(&self) -> &AiBridgeConfig
pub fn config(&self) -> &AiBridgeConfig
Get the configuration
Sourcepub fn check_tool(&self, tool: AiTool) -> Result<bool>
pub fn check_tool(&self, tool: AiTool) -> Result<bool>
Check if a tool is available
Sourcepub fn execute(
&self,
tool: AiTool,
input_files: &[PathBuf],
output_dir: &Path,
tool_options: &dyn Any,
) -> Result<AiTaskResult>
pub fn execute( &self, tool: AiTool, input_files: &[PathBuf], output_dir: &Path, tool_options: &dyn Any, ) -> Result<AiTaskResult>
Execute AI tool
§Arguments
tool- The AI tool to executeinput_files- Input file pathsoutput_dir- Output directory for resultstool_options- Tool-specific options (can be downcast to RealEsrganOptions, etc.)
Auto Trait Implementations§
impl Freeze for SubprocessBridge
impl RefUnwindSafe for SubprocessBridge
impl Send for SubprocessBridge
impl Sync for SubprocessBridge
impl Unpin for SubprocessBridge
impl UnwindSafe for SubprocessBridge
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more