pub struct AcpPaths { /* private fields */ }Expand description
ACP paths manager for local agent installation.
Implementations§
Source§impl AcpPaths
impl AcpPaths
Sourcepub fn with_base_dir(base_dir: PathBuf) -> AcpPaths
pub fn with_base_dir(base_dir: PathBuf) -> AcpPaths
Create AcpPaths with a custom base directory (for testing).
Sourcepub fn agent_version_dir(&self, agent_id: &str, version: &str) -> PathBuf
pub fn agent_version_dir(&self, agent_id: &str, version: &str) -> PathBuf
Get the directory for a specific agent version.
Sourcepub fn downloads_dir(&self) -> PathBuf
pub fn downloads_dir(&self) -> PathBuf
Get the downloads directory.
Sourcepub fn agent_download_dir(&self, agent_id: &str, version: &str) -> PathBuf
pub fn agent_download_dir(&self, agent_id: &str, version: &str) -> PathBuf
Get the download directory for a specific agent version.
Sourcepub fn runtimes_dir(&self) -> PathBuf
pub fn runtimes_dir(&self) -> PathBuf
Get the runtimes directory.
Sourcepub fn runtime_dir(&self, runtime: &str, version: &str) -> PathBuf
pub fn runtime_dir(&self, runtime: &str, version: &str) -> PathBuf
Get the directory for a specific runtime.
Sourcepub fn registry_cache_path(&self) -> PathBuf
pub fn registry_cache_path(&self) -> PathBuf
Get the path to the registry cache file.
Sourcepub fn installed_state_path(&self) -> PathBuf
pub fn installed_state_path(&self) -> PathBuf
Get the path to the installed agents state file.
Sourcepub fn ensure_directories(&self) -> Result<(), Error>
pub fn ensure_directories(&self) -> Result<(), Error>
Ensure all required directories exist.
Sourcepub fn current_platform() -> String
pub fn current_platform() -> String
Get the current platform target string. Returns format like “darwin-aarch64”, “darwin-x86_64”, “linux-x86_64”, etc.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AcpPaths
impl RefUnwindSafe for AcpPaths
impl Send for AcpPaths
impl Sync for AcpPaths
impl Unpin for AcpPaths
impl UnsafeUnpin for AcpPaths
impl UnwindSafe for AcpPaths
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> 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