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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.