1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#![deny(missing_docs)] #![deny(unsafe_code)] //! This are Custom Enum codes for memorable and uniform response codes. //! Enums are `cheaper` to `compare` and `harder` to get `wrong` than strings thereby guaranteeing efficiency. //! //! ## Examples //! //! ### Create codes for File Operations //! ```no_run //! use custom_codes::FileOps; //! //! fn open_file(file_name: &str) -> FileOps { //! match std::fs::File::create(file_name) { //! Ok(_) => FileOps::CreateTrue, //! Err(_) => FileOps::CreateFalse, //! } //! } //! fn main() { //! open_file("foo.txt"); //! } //! ``` /// re-exports pub use crate::custom_codes::{ AccessStatus, ActivityStatus, ActivityToggle, Cli, Compression, CustomBool, DateTimeOp, DbOps, ExecCommand, FileOps, GenericOutcome, HardwareResources, Networking, Outcome, SecHardware, SecOps, Subscription, }; mod custom_codes;