Config

Struct Config 

Source
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: Job

Default config for a job

§export: Option<ExportConfig>
👎Deprecated since 2.22.0: use exports.locations

Deprecated single export configuration; use exports.locations instead.

§export_locations: Option<bool>
👎Deprecated since 2.9.0: use exports.locations.auto

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 since 2.0.0: use keybindings

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

Source

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).

Source

pub fn from_path(path: &Path) -> Result<Self>

Load a configuration item filling the provided path in TOML

Source

pub fn default_package_config() -> Self

Source

pub fn default_prefs() -> Self

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Config

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for Config

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. 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 UnwindSafe for Config

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T