themackabu/macros-rs Verified Publisher

By themackabu • Updated about 2024-11-06 10:52:08 -08:00

Installation

[registries.pkgci-themackabu]
index = "sparse+"
cargo add macros-rs@1.4.1 --registry "pkgci-themackabu"

About this package

simple & useful macros

macros-rs

macros-rs is a simple, lightweight, and useful library for miscellaneous macros.

Getting Started

To get started check out the docs on docs.rs!

// main.rs
use macros_rs::{exp::ternary, fmt::fmtstr};

fn main() {
  let value = true;
  let hello = "hello";

  println!("{:?} world", ternary!(value, fmtstr!("{hello}"), ""));
}
$ cargo run
Compiling project (/crates)
Finished build [unoptimized + debuginfo] target(s)

"hello" world

Dependencies

ID Version
actix-web ^4
termcolor ^1
actix-http ^3.6.0
actix-http-test ^3.2.0
actix-utils ^3.0.1
actix-web ^4.5.1
colored ^2.1.0
Details
Cargo
2024-11-06 10:52:08 -08:00
29
MIT
5.5 KiB
Assets (1)
Versions (1) View all
1.4.1 2024-11-06