Struct nix::unistd::Uid [−][src]
pub struct Uid(_);
User identifier
Newtype pattern around uid_t (which is just alias). It prevents bugs caused by accidentally
passing wrong value.
Implementations
impl Uid[src]
impl Uid[src]pub fn from_raw(uid: uid_t) -> Self[src]
Creates Uid from raw uid_t.
pub fn current() -> Self[src]
Returns Uid of calling process. This is practically a more Rusty alias for getuid.
pub fn effective() -> Self[src]
Returns effective Uid of calling process. This is practically a more Rusty alias for geteuid.
pub fn is_root(self) -> bool[src]
Returns true if the Uid represents privileged user - root. (If it equals zero.)
pub fn as_raw(self) -> uid_t[src]
Get the raw uid_t wrapped by self.