pub struct Manifest {
    pub project: Project,
    pub network: Option<Network>,
    pub dependencies: Option<BTreeMap<String, Dependency>>,
}
Expand description

A direct mapping to a Forc.toml.

Fields

project: Projectnetwork: Option<Network>dependencies: Option<BTreeMap<String, Dependency>>

Implementations

source

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

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.

Validate the Manifest.

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

Given a directory to a forc project containing a Forc.toml, read the manifest.

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

Produce an iterator yielding all listed dependencies.

Produce an iterator yielding all Detailed dependencies.

Retrieve a reference to the dependency with the given name.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. 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.

Should always be Self

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.