Crate floatd

source ·
Expand description

Tiny crate that provides a “FloatD” trait, i.e. num_traits::Float + Debug + Display. This is likely to be subsumed into a successor crate once my project is more mature. For now, this is the most convenient place to keep the trait.

According to the rust api guidelines chapter on futureproofing, specifying Display and Debug as trait bounds is bad practice.

I think my downstream use case for this crate (guaranteeing a struct’s underlying data can be formatted into an associated error type) falls under exception 1 listed in the guidelines. Your mileage may vary, though.

Traits§

  • That’s literally it, just Display + Debug + Float