dstr

Crates.iodstr
lib.rsdstr
version0.1.5
created_at2025-02-08 03:23:34.436857+00
updated_at2025-09-29 03:19:41.724267+00
descriptionget string from Debug trait
homepagehttps://github.com/i18n-site/rust/tree/main/dstr
repositoryhttps://github.com/i18n-site/rust.git
max_upload_size
id1547720
size21,182
i18n.site (i18nsite)

documentation

README

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 ⋅ 国际化解决方案 的开源组件。

Commit count: 68

cargo fmt