Lines Matching defs:from
76 /// Creates `Uid` from raw `uid_t`.
105 fn from(uid: Uid) -> Self {
111 fn from(uid: uid_t) -> Self {
133 /// Creates `Gid` from raw `gid_t`.
157 fn from(gid: Gid) -> Self {
163 fn from(gid: gid_t) -> Self {
185 /// Creates `Pid` from raw `pid_t`.
209 fn from(pid: Pid) -> Self {
676 return Ok(PathBuf::from(OsString::from_vec(buf)));
935 /// Daemonize this process by detaching from the controlling terminal (see
1068 /// Read from a raw file descriptor.
1533 // increases from zero before the next call. It would return the total
1577 /// `setgroups` can be used when dropping privileges from the root user to a
1701 /// `initgroups` can be used when dropping privileges from the root user to
1769 //! // Set an alarm for 60 seconds from now.
1800 //! // Set an alarm for 1 second from now.
1915 Ok((fd, PathBuf::from(pathname)))
2153 /// priority level from its own scheduling priority.
2200 /// returned from the `gethostname` function
3015 fn from(pw: &libc::passwd) -> User {
3022 dir: if pw.pw_dir.is_null() { Default::default() } else { PathBuf::from(OsStr::from_bytes(CStr::from_ptr(pw.pw_dir).to_bytes())) },
3023 shell: if pw.pw_shell.is_null() { Default::default() } else { PathBuf::from(OsStr::from_bytes(CStr::from_ptr(pw.pw_shell).to_bytes())) },
3054 fn from(u: User) -> Self {
3133 return Ok(Some(User::from(&pwd)));
3203 fn from(gr: &libc::group) -> Group {
3257 return Ok(Some(Group::from(&grp)));