Skip to content

Commit 012d5ea

Browse files
authored
Add Pid::as_raw_pid (#1440)
1 parent 5ce17db commit 012d5ea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/pid.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ impl Pid {
7878
self.0
7979
}
8080

81+
/// Converts a `Pid` into a `RawPid`.
82+
#[inline]
83+
pub const fn as_raw_pid(self) -> RawPid {
84+
self.0.get()
85+
}
86+
8187
/// Converts an `Option<Pid>` into a `RawPid`.
8288
#[inline]
8389
pub const fn as_raw(pid: Option<Self>) -> RawPid {

0 commit comments

Comments
 (0)