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
impl FluxConfig
Sourcepub fn load() -> Result<FluxConfig>
pub fn load() -> Result<FluxConfig>
Discovers and loads the configuration for an invocation in the current directory.
Sourcefn load_files(paths: &[Utf8PathBuf]) -> Result<FluxConfig>
fn load_files(paths: &[Utf8PathBuf]) -> Result<FluxConfig>
Loads and merges the given files, ordered from highest to lowest precedence.
fn from_value(value: ConfigValue) -> Result<FluxConfig>
Sourcepub fn for_package(
&self,
name: &str,
version: &str,
is_workspace_member: bool,
) -> Result<PackageConfig>
pub fn for_package( &self, name: &str, version: &str, is_workspace_member: bool, ) -> Result<PackageConfig>
Returns the configuration for the package name at version.
Sourcepub fn unmatched_specs(&self, packages: &[(String, String)]) -> Vec<&str>
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.
Sourcepub fn global_fluxflags(&self) -> Vec<String>
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
impl Debug for FluxConfig
Auto Trait Implementations§
impl Freeze for FluxConfig
impl RefUnwindSafe for FluxConfig
impl Send for FluxConfig
impl Sync for FluxConfig
impl Unpin for FluxConfig
impl UnsafeUnpin for FluxConfig
impl UnwindSafe for FluxConfig
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