pub struct Merger {
pub bin: String,
pub timeout: Duration,
}Expand description
Runs merges through a claude binary.
Fields§
§bin: StringThe binary to run. Resolved through PATH like any other command.
timeout: DurationHow long it may take before the merge is abandoned.
Implementations§
Source§impl Merger
impl Merger
Sourcepub fn new(bin: impl Into<String>, timeout: Duration) -> Merger
pub fn new(bin: impl Into<String>, timeout: Duration) -> Merger
Builds a merger around one binary and one timeout.
Sourcepub async fn merge(
&self,
old_content: &str,
new_content: &str,
) -> Result<String, Error>
pub async fn merge( &self, old_content: &str, new_content: &str, ) -> Result<String, Error>
Returns a single reconciled version of the two inputs.
Sourcepub async fn ask(
&self,
system_prompt: &str,
body: &str,
) -> Result<String, Error>
pub async fn ask( &self, system_prompt: &str, body: &str, ) -> Result<String, Error>
One claude -p call: system_prompt in place of Claude Code’s own,
body on stdin, and the answer’s text. Every flag that keeps a merge
cheap and inert applies to any call made here: no tools, one turn,
nothing persisted, no MCP servers, a neutral working directory.
The evaluation’s contradiction check asks through this too.
Sourcepub async fn check_status(&self) -> Status
pub async fn check_status(&self) -> Status
Runs claude auth status, which is a local check and costs no
tokens. A missing binary is reported as unavailable, never a panic.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Merger
impl RefUnwindSafe for Merger
impl Send for Merger
impl Sync for Merger
impl Unpin for Merger
impl UnsafeUnpin for Merger
impl UnwindSafe for Merger
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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