Macro serde_yml::macro_get_field

source ·
macro_rules! macro_get_field {
    ($func_name:ident, $deserializer:expr) => { ... };
}
Expand description

Macro to generate a function that retrieves a field value from a JSON file.

§Arguments

  • $func_name - The name of the generated function.
  • $deserializer - The deserializer used to parse the JSON file.

§Returns

The generated function returns a Result containing the field value as a String, or a Box<dyn std::error::Error> if an error occurs.