Skip to main content

Module toml

Module toml 

Source
Expand description

Implementations of Toml cheatcodes.

Re-exportsยง

use crate::Cheatcode; ๐Ÿ”’
use crate::CheatcodesCore; ๐Ÿ”’
use crate::Result; ๐Ÿ”’
use crate::json::check_json_key_exists; ๐Ÿ”’
use crate::json::parse_json; ๐Ÿ”’
use crate::json::parse_json_coerce; ๐Ÿ”’
use crate::json::parse_json_coerce_default; ๐Ÿ”’
use crate::json::parse_json_keys; ๐Ÿ”’
use crate::json::resolve_type; ๐Ÿ”’
use crate::json::split_value_key; ๐Ÿ”’
use alloy_dyn_abi::DynSolType; ๐Ÿ”’
use alloy_sol_types::SolValue; ๐Ÿ”’
use foundry_common::fmt::StructDefinitions; ๐Ÿ”’
use foundry_common::fs; ๐Ÿ”’
use foundry_config::fs_permissions::FsAccessKind; ๐Ÿ”’
use serde_json::Value as JsonValue; ๐Ÿ”’
use toml::Value as TomlValue; ๐Ÿ”’
use toml_edit::DocumentMut; ๐Ÿ”’
use toml_edit::Item; ๐Ÿ”’
use toml_edit::Table; ๐Ÿ”’
use toml_edit::TableLike; ๐Ÿ”’
use crate::Vm::*; ๐Ÿ”’

Macrosยง

impl_parse_toml ๐Ÿ”’

Functionsยง

format_json_to_toml ๐Ÿ”’
Format a JSON value to a TOML pretty string.
insert_toml_item ๐Ÿ”’
Inserts a new item at key into parent.
json_to_toml_item ๐Ÿ”’
Converts a JSON value to a TOML item, formatted the same way as format_json_to_toml.
json_to_toml_value ๐Ÿ”’
Convert a JSON value to a TOML value.
parse_toml ๐Ÿ”’
Parse a TOML string and return the value at the given path.
parse_toml_coerce ๐Ÿ”’
Parse a TOML string and return the value at the given path, coercing it to the given type.
parse_toml_coerce_default ๐Ÿ”’
Parse a TOML string and return the value at the given path, coercing it to the given type, or return the default if the path does not exist.
parse_toml_document ๐Ÿ”’
Parses a TOML string into a document that keeps its formatting and comments.
parse_toml_keys ๐Ÿ”’
Parse a TOML string and return an array of all keys at the given path.
parse_toml_str ๐Ÿ”’
Parse
reset_table_layout ๐Ÿ”’
Recursively clears the document position and header whitespace of all tables in item.
tables ๐Ÿ”’
Returns the tables of item that are written with a header.
tables_mut ๐Ÿ”’
Returns the tables of item that are written with a header.
toml_to_json_string ๐Ÿ”’
Convert a TOML string to a JSON string.
toml_to_json_value ๐Ÿ”’
Convert a TOML value to a JSON value.
upsert_toml_value ๐Ÿ”’
Inserts or replaces the value at key in a TOML document, creating intermediate tables if necessary.