Docs.rs
framework-system-26.8.151
framework-system 26.8.151
Docs.rs crate page
MIT
23 October 2026
Links
Repository
crates.io
Source
Owners
lingting
Dependencies
anyhow ^1.0
normal
libc ^0.2
normal
windows-sys ^0.61
normal
Versions
100%
of the crate is documented
Platform
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
Skip to main content
is_elevated
framework_
system
26.8.151
framework_system
Function
is_
elevated
Copy item path
Source
pub fn is_elevated() ->
Result
<
bool
>
Expand description
判断当前进程是否以管理员(Windows)或 root(Linux、macOS)身份运行。
Windows:查询当前进程令牌的
TokenElevation
,为真表示已提权。
Linux、macOS:判断有效用户 ID 是否为
0
。
其他平台:始终返回假。