pub struct ClaudeClientBuilder { /* private fields */ }Implementations§
Source§impl ClaudeClientBuilder
impl ClaudeClientBuilder
pub fn binary(self, binary: impl Into<PathBuf>) -> Self
pub fn working_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
Sourcepub fn claude_home(self, home: impl Into<PathBuf>) -> Self
pub fn claude_home(self, home: impl Into<PathBuf>) -> Self
Sets an application-scoped Claude home directory (wrapper-managed).
When set, the wrapper injects environment variables (HOME, XDG_*, and Windows
equivalents) so the real claude CLI writes state beneath this directory.
If you do not call this, the wrapper will also honor CLAUDE_HOME when present.
Sourcepub fn create_home_dirs(self, enable: bool) -> Self
pub fn create_home_dirs(self, enable: bool) -> Self
Controls whether the wrapper should create the Claude home directory tree when
Self::claude_home (or CLAUDE_HOME) is set.
Sourcepub fn seed_profile_from(
self,
seed_user_home: impl Into<PathBuf>,
level: ClaudeHomeSeedLevel,
) -> Self
pub fn seed_profile_from( self, seed_user_home: impl Into<PathBuf>, level: ClaudeHomeSeedLevel, ) -> Self
Opt-in seeding of an isolated Claude home from an existing user profile.
This is best-effort for missing sources; copy failures are surfaced when running commands (the wrapper will return an error before spawning the real binary).
Sourcepub fn seed_profile_from_current_user_home(
self,
level: ClaudeHomeSeedLevel,
) -> Self
pub fn seed_profile_from_current_user_home( self, level: ClaudeHomeSeedLevel, ) -> Self
Convenience helper that seeds from the current user’s home directory (best-effort).
If the home directory cannot be inferred from environment variables, this is a no-op.
pub fn timeout(self, timeout: Option<Duration>) -> Self
pub fn mirror_stdout(self, enabled: bool) -> Self
pub fn mirror_stderr(self, enabled: bool) -> Self
pub fn build(self) -> ClaudeClient
Trait Implementations§
Source§impl Clone for ClaudeClientBuilder
impl Clone for ClaudeClientBuilder
Source§fn clone(&self) -> ClaudeClientBuilder
fn clone(&self) -> ClaudeClientBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClaudeClientBuilder
impl Debug for ClaudeClientBuilder
Auto Trait Implementations§
impl Freeze for ClaudeClientBuilder
impl RefUnwindSafe for ClaudeClientBuilder
impl Send for ClaudeClientBuilder
impl Sync for ClaudeClientBuilder
impl Unpin for ClaudeClientBuilder
impl UnsafeUnpin for ClaudeClientBuilder
impl UnwindSafe for ClaudeClientBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.