check_elevation

Crates.iocheck_elevation
lib.rscheck_elevation
version0.2.7
created_at2023-10-08 16:43:34.014746+00
updated_at2025-06-19 08:10:12.921144+00
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
size8,785
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: 29

cargo fmt