Skip to main content

FluxConfig

Struct FluxConfig 

Source
pub struct FluxConfig {
    pub build: Build,
    settings: Option<ConfigValue>,
    packages: BTreeMap<String, PackageOverride>,
}
Expand description

The merged content of all configuration files.

Fields§

§build: Build§settings: Option<ConfigValue>

Top-level settings, kept untyped to merge them with package overrides. None if there are no configuration files.

§packages: BTreeMap<String, PackageOverride>

[package.<spec>] tables, indexed by spec.

Implementations§

Source§

impl FluxConfig

Source

pub fn load() -> Result<FluxConfig>

Discovers and loads the configuration for an invocation in the current directory.

Source

fn load_files(paths: &[Utf8PathBuf]) -> Result<FluxConfig>

Loads and merges the given files, ordered from highest to lowest precedence.

Source

fn from_value(value: ConfigValue) -> Result<FluxConfig>

Source

pub fn for_package( &self, name: &str, version: &str, is_workspace_member: bool, ) -> Result<PackageConfig>

Returns the configuration for the package name at version.

Source

pub fn unmatched_specs(&self, packages: &[(String, String)]) -> Vec<&str>

Returns the specs of [package.<spec>] tables that match none of packages, given as pairs of name and version.

Source

pub fn global_fluxflags(&self) -> Vec<String>

Returns the extra flags passed to every package. Following cargo’s rules for rustflags, they come from the first source that is set among FLUX_ENCODED_FLAGS, FLUXFLAGS and build.fluxflags. Sources are not combined.

Trait Implementations§

Source§

impl Debug for FluxConfig

Source§

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

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

impl Default for FluxConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more