check_elevation

Crates.iocheck_elevation
lib.rscheck_elevation
version0.2.4
sourcesrc
created_at2023-10-08 16:43:34.014746
updated_at2023-10-11 09:40:12.810099
descriptionCheck if the current process is elevated. A successor to the `is_elevated` crate. Now no_std!
homepagehttps://github.com/h4rldev/check_elevation
repositoryhttps://github.com/h4rldev/check_elevation
max_upload_size
id997280
size6,033
H4rl (h4rldev)

documentation

README

check_elevation

license version

A tool to check the elevation status through a simple function.

Successor to is_elevated.

Example

use check_elevation::is_elevated;


fn main() {
    if is_elevated().expect("Failed to get elevation status.") {
        println!("Running as administrator.");
    } else {
        println!("Not running as administrator.");
    }
}

Dependencies

Commit count: 24

cargo fmt