pub struct Config {
pub prefix: PathBuf,
pub cellar: PathBuf,
pub taps_dir: PathBuf,
pub cache_dir: PathBuf,
pub api_base_url: String,
pub artifact_domain: Option<String>,
pub docker_registry_token: Option<String>,
pub docker_registry_basic_auth: Option<String>,
pub github_api_token: Option<String>,
pub private_cask_store_dir: PathBuf,
}Fields§
§prefix: PathBuf§cellar: PathBuf§taps_dir: PathBuf§cache_dir: PathBuf§api_base_url: String§artifact_domain: Option<String>§docker_registry_token: Option<String>§docker_registry_basic_auth: Option<String>§github_api_token: Option<String>§private_cask_store_dir: PathBufImplementations§
Source§impl Config
impl Config
pub fn load() -> Result<Self>
pub fn prefix(&self) -> &Path
pub fn cellar_path(&self) -> &Path
pub fn caskroom_dir(&self) -> PathBuf
pub fn opt_dir(&self) -> PathBuf
pub fn bin_dir(&self) -> PathBuf
pub fn applications_dir(&self) -> PathBuf
pub fn formula_cellar_dir(&self, formula_name: &str) -> PathBuf
pub fn formula_keg_path(&self, formula_name: &str, version_str: &str) -> PathBuf
pub fn formula_opt_link_path(&self, formula_name: &str) -> PathBuf
pub fn cask_dir(&self, cask_token: &str) -> PathBuf
Sourcepub fn cask_token_path(&self, cask_token: &str) -> PathBuf
pub fn cask_token_path(&self, cask_token: &str) -> PathBuf
Returns the path to the cask’s token directory in the caskroom.
Sourcepub fn private_cask_store_base_dir(&self) -> &Path
pub fn private_cask_store_base_dir(&self) -> &Path
Returns the base directory for the private cask store
Sourcepub fn private_cask_token_path(&self, cask_token: &str) -> PathBuf
pub fn private_cask_token_path(&self, cask_token: &str) -> PathBuf
Returns the path to the cask’s token directory in the private store
Sourcepub fn private_cask_version_path(
&self,
cask_token: &str,
version_str: &str,
) -> PathBuf
pub fn private_cask_version_path( &self, cask_token: &str, version_str: &str, ) -> PathBuf
Returns the path to the version directory in the private store
Sourcepub fn private_cask_app_path(
&self,
cask_token: &str,
version_str: &str,
app_name: &str,
) -> PathBuf
pub fn private_cask_app_path( &self, cask_token: &str, version_str: &str, app_name: &str, ) -> PathBuf
Returns the path to an app in the private store
pub fn cask_version_path(&self, cask_token: &str, version_str: &str) -> PathBuf
Sourcepub fn manpagedir(&self) -> PathBuf
pub fn manpagedir(&self) -> PathBuf
Returns the base manpage directory (e.g., /usr/local/share/man).
pub fn get_tap_path(&self, name: &str) -> Option<PathBuf>
pub fn get_formula_path_from_tap( &self, tap_name: &str, formula_name: &str, ) -> Option<PathBuf>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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