serde_fmt

Crates.ioserde_fmt
lib.rsserde_fmt
version1.0.3
sourcesrc
created_at2019-07-10 23:44:11.650458
updated_at2023-05-05 01:33:24.525247
descriptionWrite any serde::Serialize using the standard formatting APIs
homepage
repositoryhttps://github.com/KodrAus/serde_fmt.git
max_upload_size
id148183
size30,395
Ashley Mannix (KodrAus)

documentation

https://docs.rs/serde_fmt

README

serde_fmt

rust Latest version Documentation Latest

Convert any serde::Serialize into a std::fmt::Debug:

fn takes_serialize(v: impl Serialize) {
    dbg!(serde_fmt::to_debug(&v));

    // Do something with `v`
}

Supported rustc

This library requires a Rust compiler that's at least 1.42.0.

Getting started

Add serde_fmt to your Cargo.toml:

[dependencies.serde_fmt]
version = "1.0.3"

By default, this library will depend on the standard library. To use it in no-std environments, you can disable the default crate features:

[dependencies.serde_fmt]
version = "1.0.3"
default-features = false
Commit count: 27

cargo fmt