pub struct Config {
pub banner: bool,
pub packages: HashMap<String, Package>,
pub profiles: HashMap<String, Profile>,
pub variables: Table,
pub prompts: HashMap<String, String>,
pub symlink: bool,
pub bitwarden_note: Option<String>,
pub prompt_backend: Option<PromptBackendType>,
}Fields§
§packages: HashMap<String, Package>§profiles: HashMap<String, Profile>§variables: Table§prompts: HashMap<String, String>§symlink: bool§bitwarden_note: Option<String>Name of the Bitwarden secure note used when prompt_backend = "bitwarden". Defaults to prompt_store::DEFAULT_BITWARDEN_NOTE when unset.
prompt_backend: Option<PromptBackendType>Repo-wide default backend for every prompt. A profile’s own
prompt_backend overrides this when that profile is active.
Implementations§
Source§impl Config
impl Config
pub fn from_path(cwd: &Path) -> Result<Self>
pub fn save(&self, cwd: &Path) -> Result<()>
pub fn from_table(table: &Table) -> Result<Self>
pub fn import_package(&mut self, args: &ImportArgs, ctx: &Context) -> Result<()>
pub fn filter_packages( &self, ctx: &Profile, names: &Option<Vec<String>>, ignore_dependencies: bool, ) -> Result<HashMap<String, Package>>
pub fn backup_packages( &self, ctx: &Context, args: &UpdateArgs, ) -> Result<(), Error>
pub fn deploy_packages( &self, ctx: &Context, args: &DeployArgs, ) -> Result<(), Error>
pub fn diff_packages(&self, ctx: &Context, args: &DiffArgs) -> Result<(), Error>
pub fn update_profiles( &mut self, profile: &Profile, ctx: &Context, ) -> Result<()>
pub fn init(cwd: &Path) -> Result<Self, Error>
pub fn new() -> Self
pub fn list_packages( &self, ctx: &Context, args: &PackagesListArgs, ) -> Result<()>
pub fn list_profiles(&self, args: &ProfilesListArgs) -> Result<()>
pub fn add_profile( &mut self, args: &ProfilesAddArgs, ctx: &mut Context, ) -> Result<()>
pub fn get_orphan_packages(&self) -> Vec<String>
pub fn remove_packages( &mut self, args: &RemovePackageArgs, ctx: &Context, ) -> Result<()>
pub fn remove_package(&mut self, pkg: &Package, ctx: &Context) -> Result<()>
pub fn is_package_safe_to_remove( &self, package_name: &str, ignored_profiles: &[String], ignored_packages: &[String], ) -> (bool, Vec<String>, Vec<String>)
pub fn remove_profile( &mut self, args: &ProfileRemoveArgs, ctx: &Context, ) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin 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