Crate human_bandwidth

Source
Expand description

Human-friendly bandwidth parser and formatter

§Facilities:

  • Parses bandwidth in free form like 2Gbps 340Mbps or 2.34Gbps
  • Formats bandwidth in similar form 150.024kbps (default) or 150kbps 24bps (with feature display-integer enabled)

§Features

  • Enable serde feature for serde integration.
  • Enable display-integer feature to display integer values only.

Modules§

option
Convenience module to allow serialization for Option
re
Reexport module
serde
Serde support for humanized bandwidth.

Structs§

FormattedBandwidth
A wrapper type that allows you to Display a Bandwidth

Enums§

Error
Error parsing human-friendly bandwidth

Functions§

format_bandwidth
Formats bandwidth into a human-readable string
parse_bandwidth
Parse bandwidth object 1Gbps 12Mbps 5bps or 1.012000005Gbps