#io-write #io #write #fmt #bridge #wrapper

fmt2io

A bridge between std::io::Write and std::fmt::Write

4 releases (1 stable)

Uses old Rust 2015

1.0.0 Sep 6, 2024
0.2.1 Sep 6, 2024
0.2.0 Jun 22, 2021
0.1.0 Nov 6, 2018

#233 in Rust patterns

Download history 666/week @ 2024-08-10 869/week @ 2024-08-17 596/week @ 2024-08-24 745/week @ 2024-08-31 1270/week @ 2024-09-07 592/week @ 2024-09-14 1370/week @ 2024-09-21 1086/week @ 2024-09-28 1562/week @ 2024-10-05 2840/week @ 2024-10-12 1602/week @ 2024-10-19 1676/week @ 2024-10-26 1000/week @ 2024-11-02 1061/week @ 2024-11-09 1003/week @ 2024-11-16 1225/week @ 2024-11-23

4,456 downloads per month
Used in 30 crates (3 directly)

MITNFA license

7KB

Fmt to IO

A bridge between std::io::Write and std::fmt::Write.

About

Have you ever implemented a nice algorithm that generically uses fmt::Write only to find out it doesn't work with io::Write? Worry no more - this is the solution!

This crate provides a simple write function which takes your io::Writer, converts it to fmt::Writer and provides it to your closure. This way, you can easily bridge the two traits and have truly generic code.

Maintenance status

Passively maintained/done.

The crate does one thing and one thing only. It works as expected and has sensible API. It didn't need to be changed for a very long time and only had one significant code change since its creation. The other changes were purely for cleanup before 1.0 release. It's also very small so there's pretty much zero chance of bugs. Therefore I consider it done. It's not dead, there just doesn't seem to be anything that needs changing.

MSRV

The minimal supported version of Rust is 1.0.0. This is not a joke, the crate really doesn't require any fancy compiler features. However I don't object to raising the MSRV up to what's in Debian stable if some really good reason arises. This is highly unlikely to happen.

License

MITNFA

No runtime deps