Function nix::unistd::setfsuid
pub fn setfsuid(uid: Uid) -> Uid
The portability is definied by:
#[cfg(any(target_os = "linux", target_os = "android"))]
Documentation
Set the user identity used for filesystem checks per-thread. On both success and failure, this call returns the previous filesystem user ID of the caller.
See also setfsuid(2)