Expand description
§EngCon
EngCon (Engineering Contracts) is a set of macros and traits defining contracts often found in engineering problems, e.g. the design of a distilation column.
§Including EngCon in your Project
Import engcon and engcon_macros into your project by adding the following lines to your Cargo.toml. engcon_macros contains the macros needed to derive the traits in EngCon.
[dependencies]
engcon = "0.1"
engcon_macros = "0.1"
# You can also access engcon_macros exports directly through strum using the "derive" feature
engcon = { version = "0.1", features = ["derive"] }This pattern is also used by by the well known strum crate that has helpful procedural macros for enumerations.
Structs§
- Validated
- A new-type that ensures validated data for a generic T.
- Validation
Error - An error type that is used when a validation error occurs
Traits§
Derive Macros§
- Validatable
- Makes a type validateable, means it implements the [engcon::Validator] trait.