Module utils

Module utils 

Source

Functionsยง

collect_keys
Collects the keys of a list of SchemaMetadata implementations into a single slice of strings.
filter_mapping
Filters a saphyr::Mapping and returns a new mapping with only the keys that are in the list.
format_hash_map
Formats a HashMap as a string, ala JSON
format_marker
Formats a saphyr::Marker as a string. Displays the line and column as a pair of numbers, separated by a comma.
format_scalar
Formats a saphyr::Scalar as a string. Encloses Scalar::String values in double quotes (")
format_vec
Formats a vector of values as a string, by joining them with commas
format_yaml_data
Formats a saphyr::YamlData as a string
hash_map
Create and return a HashMap with a single key & value
linked_hash_map
Create and return a LinkedHashMap with a single key & value
saphyr_yaml_string
Construct a saphyr::Yaml scalar value from a &str
scalar_to_string
Converts a saphyr::Scalar value to a String. Does NOT enclose Scalar::String values in double-quotes.
try_unwrap_saphyr_scalar
Try to unwrap a saphyr::Scalar from a saphyr::Yaml