pub struct Context {
pub home: PathBuf,
pub xdg_config_home: PathBuf,
pub xdg_runtime_dir: PathBuf,
pub state_dir: PathBuf,
pub claude_config_dir: PathBuf,
pub codex_home: PathBuf,
pub grok_home: PathBuf,
pub pi_dir: PathBuf,
pub appdata: Option<PathBuf>,
pub berth_bin: PathBuf,
pub socket_override: Option<String>,
}Fields§
§home: PathBuf§xdg_config_home: PathBuf§xdg_runtime_dir: PathBuf§state_dir: PathBuf§claude_config_dir: PathBuf§codex_home: PathBuf§grok_home: PathBuf§pi_dir: PathBuf§appdata: Option<PathBuf>§berth_bin: PathBuf§socket_override: Option<String>Implementations§
Source§impl Context
impl Context
pub fn from_env() -> Result<Self>
pub fn db_path(&self) -> PathBuf
pub fn json_legacy_path(&self) -> PathBuf
pub fn pid_path(&self) -> PathBuf
pub fn socket_path(&self) -> PathBuf
pub fn pipe_name(&self) -> String
pub fn endpoint_display(&self) -> String
pub fn opencode_plugin_dir(&self) -> PathBuf
pub fn systemd_unit_path(&self) -> PathBuf
pub fn quote_bin(&self) -> String
pub fn notify_command(&self, provider: &str) -> String
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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