pub struct ConfigRoots {
pub global: Option<PathBuf>,
pub home: Option<PathBuf>,
}Expand description
Where OpenCode’s config lives, for reading MCP server names. The fields are the roots that differ per machine, so a test can point them elsewhere.
Fields§
§global: Option<PathBuf>$XDG_CONFIG_HOME/opencode, or ~/.config/opencode.
home: Option<PathBuf>The home directory, for ~/.opencode.
Implementations§
Source§impl ConfigRoots
impl ConfigRoots
pub fn detect() -> ConfigRoots
Trait Implementations§
Source§impl Clone for ConfigRoots
impl Clone for ConfigRoots
Source§impl Debug for ConfigRoots
impl Debug for ConfigRoots
Auto Trait Implementations§
impl Freeze for ConfigRoots
impl RefUnwindSafe for ConfigRoots
impl Send for ConfigRoots
impl Sync for ConfigRoots
impl Unpin for ConfigRoots
impl UnsafeUnpin for ConfigRoots
impl UnwindSafe for ConfigRoots
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