Struct lal::Config
[−]
[src]
pub struct Config { pub backend: BackendConfiguration, pub cache: String, pub environments: BTreeMap<String, Container>, pub lastUpgrade: String, pub autoupgrade: bool, pub mounts: Vec<Mount>, pub interactive: bool, pub minimum_lal: Option<String>, }
Representation of ~/.lal/config
Fields
backend: BackendConfiguration
Configuration settings for the Backend
cache: String
Cache directory for global and stashed builds
environments: BTreeMap<String, Container>
Environments shorthands that are allowed and their full meaning
lastUpgrade: String
Time of last upgrade
autoupgrade: bool
Whether to perform automatic upgrade
mounts: Vec<Mount>
Extra volume mounts to be set for the container
interactive: bool
Force inteactive shells
minimum_lal: Option<String>
Minimum version restriction of lal enforced by this config
Methods
impl Config
[src]
fn new(defaults: ConfigDefaults) -> Config
[src]
Initialize a Config with ConfigDefaults
This will locate you homedir, and set last update check 2 days in the past. Thus, with a blank default config, you will always trigger an upgrade check.
fn read() -> LalResult<Config>
[src]
Read and deserialize a Config from ~/.lal/config
fn upgrade_check_time(&self) -> bool
[src]
Checks if it is time to perform an upgrade check
fn performed_upgrade(&mut self) -> LalResult<()>
[src]
Update the lastUpgrade time to avoid triggering it for another day
fn write(&self, silent: bool) -> LalResult<()>
[src]
Overwrite ~/.lal/config
with serialized data from this struct
fn get_container(&self, env: String) -> LalResult<Container>
[src]
Resolve an arbitrary container shorthand