pub struct CargoOptions<'a> { /* private fields */ }
Expand description

Options for queries which simulate what Cargo does.

This provides control over the resolution algorithm used by guppy’s simulation of Cargo.

Implementations

Creates a new CargoOptions with this resolver version and default settings.

The default settings are similar to what a plain cargo build does:

  • use version 1 of the Cargo resolver
  • exclude dev-dependencies
  • do not build proc macros specified in the query on the target platform
  • resolve dependencies assuming any possible host or target platform
  • do not omit any packages.

Sets the Cargo feature resolver version.

For more about feature resolution, see the documentation for CargoResolverVersion.

If set to true, causes dev-dependencies of the initial set to be followed.

This does not affect transitive dependencies – for example, a build or dev-dependency’s further dev-dependencies are never followed.

The default is true, which matches what a plain cargo build does.

Configures the way initials are treated on the target and the host.

The default is a “standard” build and this does not usually need to be set, but some advanced use cases may require it. For more about this option, see the documentation for InitialsPlatform.

Sets both the target and host platforms to the provided spec.

Sets the target platform to the provided spec.

Sets the host platform to the provided spec.

Omits edges into the given packages.

This may be useful in order to figure out what additional dependencies or features a particular set of packages pulls in.

This method is additive.

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

Returns the argument unchanged.

Calls U::from(self).

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

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.