pub struct PackageManifest {
    pub project: Project,
    pub network: Option<Network>,
    pub dependencies: Option<BTreeMap<String, Dependency>>,
    pub patch: Option<BTreeMap<String, BTreeMap<String, Dependency>>>,
    pub constants: Option<BTreeMap<String, ConfigTimeConstant>>,
    pub contract_dependencies: Option<BTreeMap<String, Dependency>>,
    /* private fields */
}
Expand description

A direct mapping to a Forc.toml.

Fields§

§project: Project§network: Option<Network>§dependencies: Option<BTreeMap<String, Dependency>>§patch: Option<BTreeMap<String, BTreeMap<String, Dependency>>>§constants: Option<BTreeMap<String, ConfigTimeConstant>>§contract_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 PackageManifest.

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 git tag associated with the version of this crate is used to specify the pinned commit at which we fetch std.

Validate the PackageManifest.

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 PackageManifest::from_file, but takes care of constructing the path to the file.

Produce an iterator yielding all listed dependencies.

Produce an iterator yielding all listed build profiles.

Produce an iterator yielding all listed contract dependencies

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.

Retrieve a reference to the contract dependency with the given name.

Retrieve a reference to the contract dependency with 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
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.

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