dstr 0.1.1

get string from Debug trait
Documentation

dstr: get string from Debug trait

use aok::{OK, Result};
use dstr::{dstr, dvec};
use tracing::info;

#[static_init::constructor(0)]
extern "C" fn _loginit() {
  loginit::init();
}

#[derive(Debug)]
pub struct T {
  pub i: i32,
}

#[test]
fn test() -> Result<()> {
  let a = T { i: 123 };
  info!("{}", dstr(&a));
  let b = T { i: 456 };
  info!("{:?}", dvec!(a, b));
  OK
}

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。