[go: up one dir, main page]

caps 0.3.3

A pure-Rust library to work with Linux capabilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern crate caps;

use caps::Capability;
use std::str::FromStr;

fn main() {
    let input = std::env::args().nth(1).expect("missing argument");
    match Capability::from_str(&input.to_uppercase()) {
        Ok(p) => println!(
            "Parsed: {} -> index={}, bitmask={}",
            p,
            p.index(),
            p.bitmask()
        ),
        Err(e) => println!("{}", e),
    }
}