numutil 0.1.0

Utility for working with Rust's core numeric types. Convenient and fast conversions between core types and other core types, core types and bytes, and vectors of core types and bytes
Documentation
  • Coverage
  • 16.67%
    3 out of 18 items documented0 out of 17 items with examples
  • Size
  • Source code size: 10.42 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.09 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • brodiealexander/numutil-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • brodiealexander

numutil

numutil is a small utility crate for making numeric type conversions easier in generic contexts. Implements the following:

  • T <---> [u8; size_of::<T>()] for the core types that implement to/from ne/le/be bytes methods. Exposed with trait ByteConversion.
  • Vec<T> <---> Vec<u8> For the types implementing ByteConversion. Exposed with trait VecByteConversion.
  • T as U and U as T for any pairing of T and U that you could normally do this with in concretely typed contexts. Exposed as LossyCast<U>::_as(self) -> U and LossyCast<U>::_from(U) -> Self