Crates.io | trilobyte |
lib.rs | trilobyte |
version | |
source | src |
created_at | 2025-03-18 04:29:44.846889+00 |
updated_at | 2025-03-21 04:40:48.401463+00 |
description | data structure representing `3` bits |
homepage | https://github.com/gabrielfalcao/trilobyte |
repository | |
max_upload_size | |
id | 1596123 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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");