# Module cargo::util::toml

source ·

## Modules

- embedded
- targets 🔒
  This module implements Cargo conventions for directory layout:

## Macros

- inheritable_field_getter 🔒
  Defines simple getter methods for inheritable fields.

## Structs

- Context 🔒
- DetailedTomlDependency
- InheritableFields
  A group of fields that are inheritable by members of the workspace
- InvalidCargoFeatures 🔒
- MaybeWorkspaceLints
- PathValue 🔒
- StringOrVec
  A StringOrVec can be parsed from either a TOML string or array, but is always stored as a vector.
- TomlLintConfig
- TomlManifest
  This type is used to deserialize `Cargo.toml` files.
- TomlOptLevel
- TomlPackage
  Represents the `package`/`project` sections of a `Cargo.toml`.
- TomlPlatform 🔒
  Corresponds to a `target` entry, but `TomlTarget` is already used.
- TomlProfile
- TomlProfiles
- TomlTarget 🔒
- TomlWorkspace
- TomlWorkspaceDependency
- TomlWorkspaceField

## Enums

- MaybeWorkspace
  An enum that allows for inheriting keys from a workspace in a Cargo.toml.
- ProfilePackageSpec
- StringOrBool
- TomlDebugInfo
- TomlDependency
- TomlLint
- TomlLintLevel
- VecStringOrBool

## Constants

- DEFAULT_README_FILES 🔒

## Traits

- ResolveToPath
- WorkspaceInherit
  This Trait exists to make `MaybeWorkspace::Workspace` generic. It makes deserialization of `MaybeWorkspace` much easier, as well as making error messages for `MaybeWorkspace::resolve` much nicer

## Functions

- bool_no_false 🔒
- default_readme_from_package_root 🔒
  Checks if a file with any of the default README file names exists in the package root. If so, returns a `String` representing that name.
- inheritable_from_path 🔒
- is_embedded
  See also `bin/cargo/commands/run.rs`s `is_manifest_command`
- is_false 🔒
- lints_to_rustflags 🔒
- parse_document
- read_manifest
  Loads a `Cargo.toml` from a file on disk.
- read_manifest_from_str 🔒
  Parse an already-loaded `Cargo.toml` as a Cargo manifest.
- readme_for_package
  Returns the name of the README file for a `TomlPackage`.
- unique_build_targets 🔒
  Checks a list of build targets, and ensures the target names are unique within a vector. If not, the name of the offending build target is returned.
- unused_dep_keys 🔒
- verify_lints 🔒
- version_trim_whitespace 🔒
- warn_on_deprecated 🔒
  Warn about paths that have been deprecated and may conflict.

## Type Aliases

- MaybeWorkspaceBtreeMap 🔒
- MaybeWorkspaceDependency 🔒
- MaybeWorkspaceRustVersion 🔒
- MaybeWorkspaceSemverVersion 🔒
- MaybeWorkspaceString 🔒
- MaybeWorkspaceStringOrBool 🔒
- MaybeWorkspaceVecString 🔒
- MaybeWorkspaceVecStringOrBool 🔒
- TomlBenchTarget 🔒
- TomlBinTarget 🔒
- TomlExampleTarget 🔒
- TomlLibTarget 🔒
- TomlLints
- TomlTestTarget 🔒
- TomlToolLints