pub struct ManifestFile { /* private fields */ }
Expand description

A Manifest that was deserialized from a file at a particular path.

Implementations

Given a path to a Forc.toml, read it and construct a Manifest.

This also validates the manifest, returning an Err in the case that invalid names, fields were used.

If core and std are unspecified, std will be added to the dependencies table implicitly. In this case, the sway_git_tag is used to specify the pinned commit at which we fetch std.

Read the manifest from the Forc.toml in the directory specified by the given path or any of its parent directories.

This is short for Manifest::from_file, but takes care of constructing the path to the file.

Validate the Manifest.

This checks the project and organization names against a set of reserved/restricted keywords and patterns, and if a given entry point exists.

The path to the Forc.toml from which this manifest was loaded.

This will always be a canonical path.

The path to the directory containing the Forc.toml from which this manfiest was loaded.

This will always be a canonical path.

Given the directory in which the file associated with this Manifest resides, produce the path to the entry file as specified in the manifest.

This will always be a canonical path.

Produces the string of the entry point file.

Parse and return the associated project’s program type.

Given the current directory and expected program type, determines whether the correct program type is present.

Access the build profile associated with the given profile name.

Given the name of a path dependency, returns the full canonical Path to the dependency.

Methods from Deref<Target = Manifest>

source

pub const DEFAULT_ENTRY_FILE_NAME: &'static str = "main.sw"

Validate the Manifest.

This checks the project and organization names against a set of reserved/restricted keywords and patterns.

Produce an iterator yielding all listed dependencies.

Produce an iterator yielding all listed build profiles.

Produce an iterator yielding all Detailed dependencies.

Produce an iterator yielding all listed patches.

Retrieve a reference to the dependency with the given name.

Retrieve a reference to the dependency with the given name.

Retrieve the listed patches for the given name.

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

The resulting type after dereferencing.

Dereferences the value.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Should always be Self

The resulting type after obtaining ownership.

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

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more