Function nix::unistd::getgroups
pub fn getgroups() -> Result<Vec<Gid>>
The portability is definied by:
#[cfg(not(any(target_os = "ios", target_os = "macos")))]
Documentation
Get the list of supplementary group IDs of the calling process.
Note: This function is not available for Apple platforms. On those
platforms, checking group membership should be achieved via communication
with the opendirectoryd
service.