is-root
A simple library to detect whether you are root/admin or not
Installation
Add is-root = "0.1.2"
to [dependencies]
section in your Cargo.toml
Usage
use is_root;
if is_root else
You can find examples in examples
directory