trilobyte 0.1.2

data structure representing `3` bits
Documentation
  • Coverage
  • 68.42%
    13 out of 19 items documented10 out of 12 items with examples
  • Size
  • Source code size: 35.01 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.78 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • gabrielfalcao

TriloByte

TriloByte is a data-structure representing 3 bits, primarily designed for representing masks and the 3 role permissions of unix files (user, group and other).

For example, a unix file with mode 007 can be represented with 3 trilobytes:

use trilobyte::TriloByte;

let trilobytes = [
    TriloByte(false, false, false),
    TriloByte(false, false, false),
    TriloByte(true, true, true),
];
let mode = trilobytes.iter().map(|t| t.to_string_octal()).collect::<String>();
assert_eq!(mode, "007");

Continuous Integration