# Backend internal interview (rust) ## CHANGES: improved branch - Create abstractions / models to load and parse metrics, can be easily extended - Define basic operations via [`MetricParser`] trait path **defs/metrics.rs** - Use **structs** to group metrics attributes and implement operations like [`metrics_consumer::MetricsConsumerTarget`] - Use **enums** with associated values like [`defs::metric_data::MetricsConsumerData`] path **defs/metric_data** to group attributes and values - Remove **Maps collections**, use [Vectors](https://doc.rust-lang.org/std/vec/struct.Vec.html) - Use **const** for DEFAULT values on [`defs`] module - Remove all <i>hardcoded</i> values to [`Config`] settings, a **TOML config file** (see config.toml) can be used to define several metrics input and customize output - **Output** write to file (append o rewrite mode) is working (for now I/O is sync) - **Command line** arguments are processed [`parse_args`] with [`defs::CliSettings`] via [clap](https://docs.rs/clap/latest/clap/) and **overide** the ones loaded in **config files** - **Tests** have been accommodated from previous [Branch basic-fixed](https://repo.jesusperez.pro/NewRelic/be-technical-interview-rust/src/branch/basic-fixed) version to **imporved** approach