Simplicio
Get rid of the annoying boilerplate in Rust and simplify creation of Strings and HashMaps.
Features
s!()can be used to:- create a new
String - convert any value that implements the
Displaytrait into a string - concatinate values together that implement the
Displaytrait - concatinate while inserting a space between each value with the
.prefix (e.g.s!(.a, b, c))
- create a new
cnct!()is a wrapper arounds!()for preferential purposesmap()creates a HashMap with initial values or from a Vec/array of tuple pairsmap!(k1 v1, k1 v2)|map!(k1: v1, k2:v2)|map!(k1 => v1, k2 => v2)|map!(k1 -> v1, k2 -> v2)Pathvariables, if used as keys, are limited to=>,:, or[value]delimiters- Create a new
HashMapwithmap!() - Can extend
HashMaps
Getting Started
To start using Simplicio, add the following to your Cargo.toml:
[]
= "0.1.3"
- Minimum supported Rust version:
1.56.1
Usage
String creation and concatination
use ;
// Creating an enum for example purposes
//Create the enum, Enum
Creating HashMaps
use *;
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
._. why would you do this?