Struct hakari::HakariOutputOptions [−][src]
pub struct HakariOutputOptions { /* fields omitted */ }
Expand description
Options for Hakari TOML output.
Implementations
Creates a new instance with default settings.
The default settings are:
- do not output exact versions
- do not output a summary of builder options
If set to true, outputs exact versions in package version fields.
By default, Hakari outputs the loosest possible version requirement that matches the
specified package. This is generally appropriate if the Cargo.lock
file isn’t checked in,
and there’s no automated process keeping the dependencies up-to-date.
In some cases one may wish to output the exact versions selected instead. For example:
- The
Cargo.lock
file is checked in and all developers have matching lockfiles. - A tool like Dependabot is configured to update
Cargo.toml
files to their latest versions.
Note
If set to true, and the Cargo.lock
file isn’t checked in, Hakari’s output will vary based
on the repository it is run in. Most of the time this isn’t desirable.
If set to true, outputs absolute paths for path dependencies.
By default, hakari
outputs relative paths, for example:
path-dependency = { path = "../../path-dependency" }
If set to true, hakari
will output absolute paths, for example:
path-dependency = { path = "/path/to/path-dependency" }
In most situations, relative paths lead to better results. Use with care.
Notes
If set to false, a Hakari package must be specified in HakariBuilder
. If
it isn’t and Hakari needs to output a relative path,
TomlOutError::PathWithoutHakari
will be returned.
If set to true, outputs a summary of the builder options used to generate the Hakari
, as
TOML comments.
The options are output as a header in the Hakari section:
...
Requires the cli-support
feature to be enabled.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for HakariOutputOptions
impl Send for HakariOutputOptions
impl Sync for HakariOutputOptions
impl Unpin for HakariOutputOptions
impl UnwindSafe for HakariOutputOptions
Blanket Implementations
Mutably borrows from an owned value. Read more