Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithCargoLocked

Method
📦 Aspire.Hosting.Rust v17.0.0-preview.1.26565.2
func (RustAppResource) WithCargoLocked(options ...*WithCargoLockedOptions) RustAppResource

Signature

methodWithCargoLockedbuilder
Configures the Rust application to build and run with the exact dependency versions recorded in Cargo.lock.
WithCargoLocked(options ...*WithCargoLockedOptions) RustAppResource
options...*WithCargoLockedOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithCargoLockedOptions argument.

Locked*booltrue to add --locked; otherwise false.
RustAppResource

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: