Module maelstrom_client::spec
source · Expand description
Provide utilities for evaluating job specification directives.
The job specification directives for cargo-maelstrom
and the CLI differ in a number of ways, but
also have a number of similar constructs. This module includes utilities for those similar
constructs.
Modules§
- Provide
substitute
function to do variable substitutions in strings.
Structs§
- A convenience struct for extracting parts of an OCI image for use in a
maelstrom_base::JobSpec
. - A struct used for deserializing “image” statements in JSON, TOML, or other similar formats. This allows the user to specify an image name and the parts of the image they want to use.
- A simple wrapper struct for the config of a local OCI image. This is used for dependency injection for the other functions in this module.
Enums§
- An enum and struct (
EnumSet<ImageUse>
) used for deserializing “image use” statements in JSON, TOML, or other similar formats. This allows users to specify things likeuse = ["layers", "environment"]
in TOML, or the equivalent in JSON. - An enum that indicates whether a value is explicitly specified, or implicitly defined to be the value inherited from an image.
Traits§
Functions§
- A function used when writing customer deserializers for job specification directives to indicate that two fields are incompatible.
- A function that can passed to
substitute::substitute
as theenv_lookup
closure that will resolve variables from the program’s environment.