Struct nix::unistd::Gid
pub struct Gid(_);
Documentation
Group identifier
Newtype pattern around gid_t
(which is just alias). It prevents bugs caused by accidentally
passing wrong value.
Implementations
impl Gid
pub const fn from_raw(gid: gid_t) -> Self
Creates Gid
from raw gid_t
.
pub fn current() -> Self
Returns Gid of calling process. This is practically a more Rusty alias for getgid
.
pub fn effective() -> Self
Returns effective Gid of calling process. This is practically a more Rusty alias for getegid
.
pub const fn as_raw(Self) -> gid_t
Get the raw gid_t
wrapped by self
.
Trait Implementations
impl Debug for Gid
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Display for Gid
fn fmt(&Self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Hash for Gid
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()
impl StructuralEq for Gid
impl StructuralPartialEq for Gid
Auto Trait Implementations
impl RefUnwindSafe for Gid
impl UnwindSafe for Gid
Blanket Implementations
impl<T> BorrowMut<T> for T
where
T: ?Sized,
where
T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T