buf-trait 0.4.1

abstract over [u8], str, and friends
Documentation
  • Coverage
  • 100%
    17 out of 17 items documented0 out of 15 items with examples
  • Size
  • Source code size: 9.37 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 898.54 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • mcy/strings
    200 4 3
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mcy

buf-trait

The Buf trait.

This crate provides a trait for abstracting over buffer-like types, such as str and [u8]. This is a much stronger property than, say, implementing [AsRef<[u8]>]. These are variable-length types that you might want to store as a raw byte buffer and then transmute to and from &[u8].

This crate provides all the functionality necessary for doing so safely, correctly, and in const.