pub struct Uid(/* private fields */);
Expand description
User identifier
Newtype pattern around uid_t
(which is just alias). It prevents bugs caused by accidentally
passing wrong value.
Implementations§
Source§impl Uid
impl Uid
Sourcepub fn current() -> Self
pub fn current() -> Self
Returns Uid of calling process. This is practically a more Rusty alias for getuid
.
Sourcepub fn effective() -> Self
pub fn effective() -> Self
Returns effective Uid of calling process. This is practically a more Rusty alias for geteuid
.
Trait Implementations§
impl Copy for Uid
impl Eq for Uid
impl StructuralPartialEq for Uid
Auto Trait Implementations§
impl Freeze for Uid
impl RefUnwindSafe for Uid
impl Send for Uid
impl Sync for Uid
impl Unpin for Uid
impl UnwindSafe for Uid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)