pub struct Config {Show 14 fields
pub additional_alias_args: Option<Vec<String>>,
pub default_job: Option<ConcreteJobRef>,
pub all_jobs: Job,
pub export: Option<ExportConfig>,
pub export_locations: Option<bool>,
pub exports: HashMap<String, ExportConfig>,
pub help_line: Option<bool>,
pub jobs: HashMap<String, Job>,
pub keybindings: Option<KeyBindings>,
pub reverse: Option<bool>,
pub summary: Option<bool>,
pub vim_keys: Option<bool>,
pub listen: Option<bool>,
pub wrap: Option<bool>,
}Expand description
A configuration item which may be stored in various places, eg as bacon.toml
along a Cargo.toml file or as prefs.toml in the xdg config directory.
Leaf values are options (and not Default) so that they don’t override previously set values when applied to settings.
Fields§
§additional_alias_args: Option<Vec<String>>Extra arguments appended when a job runs a cargo alias.
default_job: Option<ConcreteJobRef>Name of the job to run when no job was requested explicitly.
all_jobs: JobDefault config for a job
export: Option<ExportConfig>Deprecated single export configuration; use exports.locations instead.
export_locations: Option<bool>Deprecated toggle for the legacy locations export; use exports.locations.auto
exports: HashMap<String, ExportConfig>Export configurations keyed by their name.
help_line: Option<bool>Whether to display the contextual help line
jobs: HashMap<String, Job>Job definitions keyed by their identifier
keybindings: Option<KeyBindings>Custom keybindings layered on top of the defaults
reverse: Option<bool>Whether to display the mission output in reverse order.
summary: Option<bool>Whether to show diagnostics summarized instead of full
vim_keys: Option<bool>Deprecated toggle that enables a built-in set of Vim-style keybindings. Use keybindings instead
listen: Option<bool>Whether to listen for actions on a unix socket (if on unix)
wrap: Option<bool>Whether to wrap long lines
Implementations§
Source§impl Config
impl Config
Sourcepub fn from_path_detect(path: &Path) -> Result<Vec<Self>>
pub fn from_path_detect(path: &Path) -> Result<Vec<Self>>
Load from zero to two configuration items from the provided path which must be in TOML format but may not exist.
Expected structures are either bacon config or a cargo.toml file (which may contain a workspace.metadata.bacon key and a package.metadata.bacon key).
Sourcepub fn from_path(path: &Path) -> Result<Self>
pub fn from_path(path: &Path) -> Result<Self>
Load a configuration item filling the provided path in TOML
pub fn default_package_config() -> Self
pub fn default_prefs() -> Self
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>,
Source§impl JsonSchema for Config
impl JsonSchema for Config
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more