pub struct Context { /* private fields */ }Implementations§
Source§impl Context
impl Context
Sourcepub fn new(home: PathBuf) -> Context
pub fn new(home: PathBuf) -> Context
Claude Code’s defaults for a person whose home is home: ~/.pitboard, ~/.claude,
the default credential slot, claude looked up on PATH. An app starts here and sets
only what differs.
pub fn with_pitboard_home(self, dir: PathBuf) -> Context
Sourcepub fn with_claude_config_dir(self, dir: String) -> Context
pub fn with_claude_config_dir(self, dir: String) -> Context
Empty means unset, as Claude Code reads CLAUDE_CONFIG_DIR.
Sourcepub fn with_secure_storage_dir(self, dir: String) -> Context
pub fn with_secure_storage_dir(self, dir: String) -> Context
Empty is set, and pins the default slot, as Claude Code reads
CLAUDE_SECURESTORAGE_CONFIG_DIR.
Sourcepub fn with_user(self, user: String) -> Context
pub fn with_user(self, user: String) -> Context
The login name whose keychain account Claude Code stores under.
Sourcepub fn with_claude_program(self, program: PathBuf) -> Context
pub fn with_claude_program(self, program: PathBuf) -> Context
An app started from Finder does not see the shell’s PATH, so it names claude itself.
pub fn from_env() -> Context
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
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